Talk:C syntax
| This is the talk page for discussing improvements to the C syntax article. This is not a forum for general discussion of the subject of the article. |
Article policies
|
| Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
| Archives: 1, 2Auto-archiving period: 3 months |
| This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
Evaluation order
The last paragraph 'Evaluation order and Lazy evaluation' is almost completely wrong! Its author should read comp.lang.c FAQ list section 3, especially answer to question 3.5. Constructions like a != NULL && func(a++) do NOT invoke undefined behaviour. The writer is confusing C's short circuit evaluation to lazy evaluation which is a completely different thing.
--193.143.83.252 17:36, 26 Mar 2004 (UTC)
- Agree completely. That section was completely incorrect. I tried to fix it. Kevin Saff 14:16, 7 Apr 2004 (UTC)
- Your version is much better than the original! I just added one sequence point to the list. 193.143.83.252
vfd
This article was proposed for deletion January 2005. The discussion is archived at Wikipedia:Votes for deletion/C syntax. Joyous 22:46, Jan 22, 2005 (UTC)
Standard library != C Syntax
The standard library (for which none of the header file names have been provided I might add) has nothing to do with the syntax of C. C can be used with other libraries or none at all; its syntax is independent of them. The translation of command-line arguments is the job of the linker and again has nothing to do with C syntax.
And then I find myself guilty of the same offense, so take what I said with a grain of salt.—Kbolino 05:41, Apr 6, 2005 (UTC)
Confusing example of labelled loops
I think example from the article C syntax#Labels is confusing:
// using break:
outer:
for (int i = 0; i < n; ++i) {
switch (i) {
case 1:
break; // jumps to 1
case 2:
break outer; // jumps to 2
default:
continue;
}
// 1
}
// 2
// using continue:
outer:
for (int i = 0; i < m; ++i) {
for (int j = 0; j < n; ++j) {
continue; // jumps to 1
continue outer; // jumps to 2
// 1
}
// 2
}
For a comment "jumps to 1": which exactly "1", line 12 or line 22? I see two possible solutions:
- Split this example into 2 code blocks.
- Use unique names instead of 1, 2, 1, 2. Maybe "label_a", "label_b", "label_c", "label_d".
Additionally, are "case 1" and "case 2" connected with names 1, 2, 1, 2? It is better not use integer numbers for names in this example. Alexey Vazhnov (talk) 22:40, 10 January 2026 (UTC)
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.
