﻿<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://www.yfrobot.com.cn/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
		<id>https://www.yfrobot.com.cn/wiki/index.php?action=history&amp;feed=atom&amp;title=%E5%A4%A7%E6%8B%AC%E5%8F%B7</id>
		<title>大括号 - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="https://www.yfrobot.com.cn/wiki/index.php?action=history&amp;feed=atom&amp;title=%E5%A4%A7%E6%8B%AC%E5%8F%B7"/>
		<link rel="alternate" type="text/html" href="https://www.yfrobot.com.cn/wiki/index.php?title=%E5%A4%A7%E6%8B%AC%E5%8F%B7&amp;action=history"/>
		<updated>2026-04-12T14:52:56Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.22.6</generator>

	<entry>
		<id>https://www.yfrobot.com.cn/wiki/index.php?title=%E5%A4%A7%E6%8B%AC%E5%8F%B7&amp;diff=516&amp;oldid=prev</id>
		<title>Admin：以“Curly braces (also referred to as just &quot;braces&quot; or as &quot;curly brackets&quot;) are a major part of the C programming language. They are used in several different constructs...”为内容创建页面</title>
		<link rel="alternate" type="text/html" href="https://www.yfrobot.com.cn/wiki/index.php?title=%E5%A4%A7%E6%8B%AC%E5%8F%B7&amp;diff=516&amp;oldid=prev"/>
				<updated>2015-07-31T12:39:30Z</updated>
		
		<summary type="html">&lt;p&gt;以“Curly braces (also referred to as just &amp;quot;braces&amp;quot; or as &amp;quot;curly brackets&amp;quot;) are a major part of the C programming language. They are used in several different constructs...”为内容创建页面&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Curly braces (also referred to as just &amp;quot;braces&amp;quot; or as &amp;quot;curly brackets&amp;quot;) are a major part of the C programming language. They are used in several different constructs, outlined below, and this can sometimes be confusing for beginners.&lt;br /&gt;
&lt;br /&gt;
An opening curly brace &amp;quot;{&amp;quot; must always be followed by a closing curly brace &amp;quot;}&amp;quot;. This is a condition that is often referred to as the braces being balanced. The Arduino IDE (integrated development environment) includes a convenient feature to check the balance of curly braces. Just select a brace, or even click the insertion point immediately following a brace, and its logical companion will be highlighted.&lt;br /&gt;
&lt;br /&gt;
At present this feature is slightly buggy as the IDE will often find (incorrectly) a brace in text that has been &amp;quot;commented out.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Beginning programmers, and programmers coming to C from the BASIC language often find using braces confusing or daunting. After all, the same curly braces replace the RETURN statement in a subroutine (function), the ENDIF statement in a conditional and the NEXT statement in a FOR loop.&lt;br /&gt;
&lt;br /&gt;
Because the use of the curly brace is so varied, it is good programming practice to type the closing brace immediately after typing the opening brace when inserting a construct which requires curly braces. Then insert some carriage returns between your braces and begin inserting statements. Your braces, and your attitude, will never become unbalanced.&lt;br /&gt;
&lt;br /&gt;
Unbalanced braces can often lead to cryptic, impenetrable compiler errors that can sometimes be hard to track down in a large program. Because of their varied usages, braces are also incredibly important to the syntax of a program and moving a brace one or two lines will often dramatically affect the meaning of a program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;sienna&amp;quot; size=&amp;quot;+2&amp;quot;&amp;gt;'''大括号的主要用途'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;orange&amp;quot; size=&amp;quot;+1&amp;quot;&amp;gt;'''函数'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:dimgray&amp;quot;&amp;gt;&lt;br /&gt;
 void myfunction(datatype argument){&lt;br /&gt;
    statements(s)&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;orange&amp;quot; size=&amp;quot;+1&amp;quot;&amp;gt;'''循环'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:dimgray&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  while (boolean expression)&lt;br /&gt;
  {&lt;br /&gt;
     statement(s)&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  do&lt;br /&gt;
  {&lt;br /&gt;
     statement(s)&lt;br /&gt;
  } while (boolean expression);&lt;br /&gt;
&lt;br /&gt;
  for (initialisation; termination condition; incrementing expr)&lt;br /&gt;
  {&lt;br /&gt;
     statement(s)&lt;br /&gt;
  } &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;orange&amp;quot; size=&amp;quot;+1&amp;quot;&amp;gt;'''条件语句'''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color:dimgray&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  if (boolean expression)&lt;br /&gt;
  {&lt;br /&gt;
     statement(s)&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  else if (boolean expression)&lt;br /&gt;
  {&lt;br /&gt;
     statement(s)&lt;br /&gt;
  } &lt;br /&gt;
  else&lt;br /&gt;
  {&lt;br /&gt;
     statement(s)&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Arduino语法参考 | 返回Arduino语法参考列表]]&lt;br /&gt;
&lt;br /&gt;
更多建议和问题欢迎反馈至 [http://www.yfrobot.com YFRobot论坛]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>