「C言語/記法」の版間の差分

削除された内容 追加された内容
Ef3 (トーク | 投稿記録)
s/ヘッダ/ヘッダー/
タグ: 2017年版ソースエディター
Ef3 (トーク | 投稿記録)
cite
タグ: 2017年版ソースエディター
121 行
 
== 字句 ==
JISCでは、<q>字句(token)は,翻訳フェーズ(7)及び(8)において言語の最小の字句的な単位とする。</q>となっていますが定義が循環していて意味不明です<ref>『JISX3010:2003』p.35「 name="jtc1-sc22-wg14-n2596-6.4 字句要素」</ref">{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
| archivedate = 2018-12-30
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 41, §6.4 ''Lexical elements''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>.。
 
原文では、<q>A token is the minimal lexical element of the language in translation phases 7 and 8.</q>とあり、「トークンとは、[[C言語/概念モデル#翻訳フェーズ7|翻訳フェーズ(7)]]および[[C言語/概念モデル#翻訳フェーズ8|(8)]]において、言語の最小の語彙要素のことです。」と訳すことが出来ます。
131 ⟶ 137行目:
 
=== 識別子 ===
識別子とは、1つ又はそれ以上の実体を指し示すもので、<ref name="識別子">『JISX3010:2003』p.37「jtc1-sc22-wg14-n2596-6.4.2">{{cite book 識別子」</ref>
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
| archivedate = 2018-12-30
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 43, §6.4.2 ''Identifiers''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>
オブジェクト、関数、構造体・共用体・列挙体のタグまたはメンバ、型定義名、ラベル名、マクロ名、マクロ仮引数のいずれか一つを表します<ref>『JISX3010:2003』p.21「6.2.1 識別子の有効範囲」</ref>。
 
識別子は、半角英数、「_(下線)」からなる文字列である。
ただし、先頭は非数字でなければなりません。
識別子に多バイト文字を使用できるかは言語処理系による<ref name="識別子jtc1-sc22-wg14-n2596-6.4.2"/>。
 
==== __func__ ====
167 ⟶ 179行目:
<blockquote class="toccolours" cite="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf">
 
; 構文形式
:; ''{{Anchor|universal-character-name}}''
:: <syntaxhighlight lang=BNF>
:: \u ''[[#hex-quad|hex-quad]]''
universal-character-name:
:: \U ''[[#hex-quad|hex-quad]]'' ''[[#hex-quad|hex-quad]]''
\u hex-quad
; \U hex-quad ''{{Anchor|hex-quad}}''
: ''[[#hexadecimal-digit|hexadecimal-digit]]'' ''[[#hexadecimal-digit|hexadecimal-digit]]'' ''[[#hexadecimal-digit|hexadecimal-digit]]'' ''[[#hexadecimal-digit|hexadecimal-digit]]''
hex-quad:
hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit
</syntaxhighlight>
; 制約条件
: 国際文字名では、短識別子が00A0未満で、0024($)、0040(@)、0060(')以外の文字、およびD800からDFFFの範囲の文字を指定してはならない。
203 ⟶ 213行目:
 
定数には整数定数、浮動小数点定数、列挙定数、文字定数があります。
; 整数定数<ref name="jtc1-sc22-wg14-n2596-6.4.4.1">{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
| archivedate = 2018-12-30
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 45, §6.4.4.1 ''Integer constants''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>
: 整数を記述するための定数
: 10進数表記のほか、2進数表記や8進数表記や16進数表記を使うことができます。
: 2進数表記では接頭辞として0bあるいは0Bを付け<ref name="jtc1-sc22-wg14-n2596-6.4.4.1"/>、8進数表記では接頭辞として0を付け、16進数表記では接頭辞として0xあるいは0Xを付けます。
:; 例
:: 42, 0b101010, 052, 0x2a
; 浮動小数点定数<ref name="jtc1-sc22-wg14-n2596-6.4.4.2">{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
| archivedate = 2018-12-30
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 47, §6.4.4.2 ''Floating constants''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>
: 浮動小数点数を記述するための定数
: 10進数の小数点数表記のほか、有効数字部と指数部あるいは、16進数浮動小数点で表記できます。
:; 例
:: 3.14, 3.14e+00, 0x1.91eb851eb851fp+1
; 列挙定数<ref>『JISX3010:2003』p.43「 name="jtc1-sc22-wg14-n2596-6.4.4.3 【列挙定数】」</ref">{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
: 列挙定数は、ユーザによって宣言された識別子で、は <code>int</code> です。{{See also|C言語/データ型と変数#enum}}
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
; 文字定数<ref>『JISX3010:2003』p.43「6.4.4.4 文字定数」</ref>
| archivedate = 2018-12-30
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 48, §6.4.4.3 ''Enumeration constants''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>
: 列挙定数は、ユーザによって宣言された識別子で、 <code>int</code> です。{{See also|C言語/データ型と変数#enum}}
; 文字定数<ref name="jtc1-sc22-wg14-n2596-6.4.4.4">{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
| archivedate = 2018-12-30
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 48, §6.4.4.4 ''Character constants''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>
: 文字を記述するための定数です。半角英数記号や制御文字などが記述できます。
:; 例
222 ⟶ 256行目:
 
{|class="wikitable"
|+ 定数の種類と記法<ref>『JISX3010:2003』p.39「 name="jtc1-sc22-wg14-n2596-6.4.4 定数」</ref">{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
| archivedate = 2018-12-30
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 45, §6.4.4 ''Constants''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>
!定数の種類!!基数!![[正規表現]]!!例
|-
!rowspan="4"|整数定数
|2進数<ref>2進数整数定数はC23で追加予定で規格としては未成ですが、clang/gcc/MSVCなど多くの言語処理系で使用可能です。</ref><ref name="jtc1-sc22-wg14-n2596-6.4.4.1"/>{{cite book
| url=http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2596.pdf
| title= N2596 working draft — December 11, 2020 ISO/IEC 9899:202x (E)
| page=51, §6.4.4.1 Integer constants
| publisher = [http://www.open-std.org/jtc1/sc22/wg14/www/projects ISO/IEC JTC1/SC22/WG14]}}</ref>
|/0[bB][01]+/
|0b10011010010 // 10進数で1234のこと
273 ⟶ 309行目:
 
*整数定数の接尾辞( ''integer-suffix'' )
整数定数に接尾辞を付けることで、符号の有無と型を指定できます<ref>『JISX3010:2003』p.39「 name="jtc1-sc22-wg14-n2596-6.4.4.1 整数定数」<"/ref>。
 
# 接尾辞がなければ、整数定数の型は (signed) int です。
285 ⟶ 321行目:
*浮動小数点定数の接尾辞( ''floating-suffix'' )
浮動小数点定数に接尾辞を付けることで、その型を指定できます。
浮動小数点定数の型は、接尾辞なしで型double、接尾辞f又はFで型float、l又はLで型long doubleです<ref>『JISX3010:2003』p.41「 name="jtc1-sc22-wg14-n2596-6.4.4.2 浮動小数点定数」<"/ref>。
 
;変数に定数の値を代入する例:<syntaxhighlight lang=c>
296 ⟶ 332行目:
 
=== 文字列リテラル ===
文字列リテラル( ''String literals'' )<ref>『JISX3010:2003』p.45「 name="jtc1-sc22-wg14-n2596-6.4.5 文字列リテラル」</ref">には、単純文字列リテラルとワイド文字列リテラルがあります。{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
| archivedate = 2018-12-30
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 50, §6.4.5 ''String literals''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>には、単純文字列リテラルとワイド文字列リテラルがあります。
; 単純文字列リテラル(character string literal)
: 1バイト文字または多バイト文字の文字列を記述するための定数である。
346 ⟶ 388行目:
|}
区切り子とは、独立した構文的及び意味的な機能を持つ記号である。
何らかの操作を行うとき、それを演算子と呼ぶ。また演算子が操作を行う対象をオペランドと呼ぶ<ref name="jtc1-sc22-wg14-n2596-7.26.4.6">{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
<ref name="区切り子">『JISX3010:2003』p.46「6.4.6 区切り子」</ref>
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
| archivedate = 2018-12-30
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 279, §7.26.4.6 ''The mtx_unlock function''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>。
 
次の6つの2文字の字句は、2文字表記( ''digraphs'' )と呼ばれます<ref name="jtc1-sc22-wg14-n2596-7.26.4.6"/>
<: :> <% %> %: %:%:
<pre>
<: :> <% %> %: %:%:
</pre>
前の6つの字句は、次の6つの字句と同じである。
[ ] { } # ##
<pre>
[ ] { } # ##
</pre>
<ref name="区切り子"/>
 
=== ヘッダー名 ===
;形式
:; ''{{Anchor|header-name}}''
:<pre>
:: < ''[[#h-char-sequence|h-char-sequence]]'' >
<文字列>
:: " ''[[#q-char-sequence|q-char-sequence]]'' "
"文字列"
:; ''{{Anchor|h-char-sequence}}''
</pre>
:: ''[[#h-char|h-char]]''
:: ''[[#h-char-sequence|h-char-sequence]]'' ''[[#h-char|h-char]]''
:; ''{{Anchor|h-char}}''
:: any member of the source character set except
:: the new-line character and >
:; ''{{Anchor|q-char-sequence}}''
:: ''[[#q-char|q-char]]''
:: ''[[#q-char-sequence|q-char-sequence]]'' ''[[#q-char|q-char]]''
:; ''{{Anchor|q-char}}''
:: any member of the source character set except
:: the new-line character and "
 
ヘッダー名とは、#include前処理指令で読み込まれるファイル名を指します。
ヘッダー名には「'、\、"、//、/*」に表れた時、その動作は未定義です<ref>以前の編集で、<ins>ヘッダー名には「'、\、"、//、/*」は指定できない。</ins>としていましたが、例えば // はネットワークルートとしてPATH に現れる事があるので指定できる(出来ないと困る)環境があります。</ref><ref name="jtc1-sc22-wg14-n2596-6.4.7">{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
<ref>『JISX3010:2003』p.46「6.4.7 ヘッダ名」</ref>
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
 
| archivedate = 2018-12-30
&#x23;include前処理指令については、[[C言語/前処理指令#ソースファイル取り込み]]を参照せよ。
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 53, §6.4.7 ''Header names''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>。
{{See argc|C言語/前処理指令#ソースファイル取り込み}}
 
=== 前処理数 ===
前処理数(Preprocessing numbers; '''''Syntax'''''では ''pp-number''<ref>JIS Cでは、用語を構文規約中のシンボルに同じ語を使っているので、C99の原文を当たらないと構文について読み誤る恐れがあります。</ref>)
 
N2176 C17 ballot ISO/IEC 9899:2017 §6.4.8 ''Preprocessing numbers'':前処理数から引用/抄訳<ref name="jtc1-sc22-wg14-n2596-6.4.8">{{cite book
以下『JISX3010:2003』からの引用<ref>『JISX3010:2003』p.47「6.4.8 前処理数」</ref>。
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
| archivedate = 2018-12-30
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 53, §6.4.8 ''Preprocessing numbers''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>.
 
<blockquote class="toccolours" cite="『JISX3010http:2003』p//www.47「6open-std.4org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.8 前処理数」pdf">
 
構文規則
;形式
<pre>
:; ''{{Anchor|pp-number}}''
前処理数
:: ''[[#digit|digit]]''
数字
:: . ''[[#digit|digit]]''
. 数字
:: ''[[#pp-number|pp-number]]'' ''[[#digit|digit]]''
前処理数 数字
:: ''[[#pp-number|pp-number]]'' ''[[#identifier-nondigit|identifier-nondigit]]''
前処理数 識別子用非数字
:: ''[[#pp-number|pp-number]]'' e ''[[#sign|sign]]''
前処理数 e符号
:: ''[[#pp-number|pp-number]]'' E ''[[#sign|sign]]''
前処理数 E符号
:: ''[[#pp-number|pp-number]]'' p ''[[#sign|sign]]''
前処理数 p符号
:: ''[[#pp-number|pp-number]]'' P ''[[#sign|sign]]''
前処理数 P符号
:: ''[[#pp-number|pp-number]]'' .
前処理数 .
</pre>
; 補足説明
: 前処理数は,省略可能な先行するピリオド(.)をもつ数字で始まる。
397 ⟶ 460行目:
: 前処理数は,型も値ももたない。型と値は,[[[C言語/概念モデル#翻訳フェーズ7|翻訳フェーズ(7)]]で]浮動小数点定数字句又は整数定数字句に変換された結果として決まる。
</blockquote>
上記のように前処理数の解析は、後にくる厳格な構文解析を行うわけではなくもっぱら字句解析によります
: <syntaxhighlight lang=c>
int i = 0xfe+0x2;
413 ⟶ 476行目:
 
=== 注釈 ===
文字定数、文字列リテラル、'''コメントの中を除き'''、/* は注釈( ''Comments''; コメント)の開始を表します<ref>『JISX3010:2003』p.48「 name="jtc1-sc22-wg14-n2596-6.4.9 注釈」</ref">{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/c17_updated_proposed_fdis.pdf
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
| archivedate = 2018-12-30
| title = N2176 C17 ballot ISO/IEC 9899:2017
| page = 54, §6.4.9 ''Comments''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>。
このようなコメントの内容は、マルチバイト文字を特定するためと、コメントを終了させる文字 */ を見つけるためにのみ検査されます。
/* . . . */ コメントはネストできません。
428 ⟶ 497行目:
 
== 文 ==
文( ''Statements'' )は<ref name="jtc1-sc22-wg14-n1570n2596-6.8">{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570c17_updated_proposed_fdis.pdf
| archiveurl = https://web.archive.org/web/20181230041359/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
| title = N1570 Committee Draft — April 12, 2011 ISO/IEC 9899:201x
| archivedate = 2018-12-30
| page = 146, §6.8 ''Statements and blocks''
| title = N2176 C17 ballot ISO/IEC 9899:2017
| publisher = ISO/IEC}}</ref><ref name="文及びブロック">『JISX3010:2003』p.99「6.8 文及びブロック」</ref>、[[#ラベル付き文|ラベル付き文]]、[[#複合文|複合文]]、[[#式文|式文]]、[[#選択文|選択文]]、[[#繰返し文|繰返し文]]、[[#分岐文|分岐文]]のいずれかです(宣言( ''declaration'' )は文ではありません)。
| page = 106, §6.8 ''Statements and blocks''
| publisher = ISO/IEC JTC1/SC22/WG14}}</ref>、[[#ラベル付き文|ラベル付き文]]、[[#複合文|複合文]]、[[#式文|式文]]、[[#選択文|選択文]]、[[#繰返し文|繰返し文]]、[[#分岐文|分岐文]]のいずれかです(宣言( ''declaration'' )は文ではありません)。
 
;形式
;構文
:; ''{{Anchor|statement}}''
:<syntaxhighlight lang=BNF>
statement ::= ''[[#labeled-statement|labeled-statement]]''
:: ''[[#compound-statement| compound-statement]]''
:: ''[[#expression-statement| expression-statement]]''
:: ''[[#selection-statement| selection-statement]]''
:: ''[[#iteration-statement| iteration-statement]]''
:: ''[[#jump-statement| jump-statement]]''
</syntaxhighlight>
 
=== ラベル付き文 ===
453 ⟶ 523行目:
ラベルはそれ自体、制御の流れを変えるものではなく、ラベルを越えても制御の流れは妨げられません。
 
;形式
;構文
:; ''{{Anchor|labeled-statement}}''
:<syntaxhighlight lang=BNF>
labeled-statement ::= ''[[#identifier|identifier]]'' : ''[[#statement|statement]]''
:: | '''case''' ''[[#constant-expression|constant-expression]]'' : ''[[#statement|statement]]''
:: | '''default''' : ''[[#statement|statement]]''
</syntaxhighlight>
 
=== 複合文 ===
469 ⟶ 538行目:
C89までのブロックの前方に宣言、後方に文を置く制限はC99でなくなり、([[C++]]のように)文より後に宣言を置くことも可能になりました。
 
; 形式
;構文
:; ''{{Anchor|compound-statement}}''
:<syntaxhighlight lang=BNF>
compound-statement ::= { [[#block-item-list|block-item-list]]<sub>opt</sub> }
:; ''{{Anchor|block-item-list}}''
 
:: ''[[#block-item-list ::= |block-item]]''
:: ''[[#block-item-list| block-item-list]]'' ''[[#block-item|block-item]]''
:; ''{{Anchor|block-item}}''
 
block-item ::= ''[[#declaration|declaration]]''
:: ''[[#statement| statement]]''
</syntaxhighlight>
 
 
=== 式文 ===
490 ⟶ 557行目:
セミコロンだけで構成される文(null文)は、何の処理も行いません。
 
;形式
;構文
:; ''{{Anchor|expression-statement}}''
:<syntaxhighlight lang=BNF>
expression-statement ::= [[#expression|expression]]<sub>opt</sub> ;
</syntaxhighlight>
 
=== 選択文 ===
505 ⟶ 571行目:
関連するサブステートメントもまた、選択ステートメントのスコープの厳密なサブセットをスコープとするブロックです。
 
;形式
;構文
:; ''{{Anchor|selection-statement}}''
:<syntaxhighlight lang=BNF>
selection-statement ::= '''if''' ( ''[[#expression|expression]]'' ) ''[[#statement|statement]]''
:: | '''if''' ( ''[[#expression|expression]]'' ) ''[[#statement|statement]]'' '''else''' ''[[#statement|statement]]''
:: | '''switch''' ( ''[[#expression|expression]]'' ) ''[[#statement|statement]]''
</syntaxhighlight>
 
{{See|C言語/制御文#if文|C言語/制御文#switch文|C言語/制御文#選択文}}
 
=== 繰り返し文 ===
繰り返し文( ''Iteration statements''、反復文とも)の制御式は、スカラー型でなければなりません
<ref name="jtc1-sc22-wg14-n1570-6.8.45">{{cite book
| url = http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
| title = N1570 Committee Draft — April 12, 2011 ISO/IEC 9899:201x
527 ⟶ 591行目:
ループ本体もまた、繰り返し文のスコープの厳密なサブセットであるブロックです。
 
; 形式
;構文
:; ''{{Anchor|iteration-statement}}''
:<syntaxhighlight lang=BNF>
iteration-statement ::= '''while''' ( ''[[#expression|expression]]'' ) ''[[#statement|statement]]''
:: | '''do''' ''[[#statement|statement]]'' '''while''' ( ''[[#expression|expression]]'' ) ;
:: | '''for''' ( [[#expression|expression]]<sub>opt</sub> ; [[#expression|expression]]<sub>opt</sub> ; [[#expression|expression]]<sub>opt</sub> ) ''[[#statement|statement]]''
:: | '''for''' ( ''[[#declaration|declaration]]'' [[#expression|expression]]<sub>opt</sub> ; [[#expression|expression]]<sub>opt</sub> ) ''[[#statement|statement]]''
</syntaxhighlight>
 
{{See|C言語/制御文#while文|C言語/制御文#do文|C言語/制御文#for文|C言語/制御文#繰り返し文}}
545 ⟶ 608行目:
| publisher = ISO/IEC}}</ref>。
 
; 形式
;構文
:; ''{{Anchor|jump-statement}}''
:<syntaxhighlight lang=BNF>
jump-statement ::= '''goto''' ''[[#identifier|identifier]]'' ;
:: | '''continue''' ;
:: | '''break''' ;
:: | '''return''' [[#expression|expression]]<sub>opt</sub> ;
</syntaxhighlight>
 
{{See|C言語/制御文#goto文|C言語/制御文#continue文|C言語/制御文#break文|C言語/制御文#return文|C言語/制御文#分岐文}}
 
560 ⟶ 621行目:
== 参考文献 ==
* 国際標準化機構/国際電気標準会議 [https://www.iso.org/obp/ui/#iso:std:iso-iec:9899:ed-4:v1:en ISO/IEC 9899:2018(en) Information technology — Programming languages — C](2018-07-05)
* 日本工業標準調査会(当時、現:日本産業標準調査会)『JIS X 3010 プログラム言語C』2003年12月20日改正
 
[[Category:C言語|きほう]]