This is the
talk page for discussing improvements to the
Syntax error article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
![]() | This article has not yet been rated on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||
|
![]() | This article links to one or more target anchors that no longer exist.
Please help fix the broken anchors. You can remove this template after fixing the problems. |
Reporting errors |
This was in the article as a syntax error, but I think it would compile okay:
Example of a syntaxlogic error in C:
static char *days[] = {"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
int i;
for(i=0;i<7;i++) printf("Day %d: %d\n",i,days[i]);
In the above example, days[i]'s memory location in integer form is printed and not the string it contains, producing unexpected results but not failing the program.
Correct code: to output correct result instead of second %d conversion must be %s conversion sign: printf("Day %d: %s\n",i,days[i]);.
Let's come up with a better example of a syntax error. -- Uncle Ed 17:36, 16 November 2006 (UTC)
Insert non-formatted text here
"In computer science a syntax error refers to an error in the syntax" - well no shit surlock
Hello everybody, I am not experienced in Javascript, so I just wanted to ask: Is it a syntax error when you call on a variable without defining its value? I think it might be a Name Error.
I'm not sure where to mention this - or if I should at all - but this revision looked pretty nasty:
https://en.wikipedia.org/?title=Syntax_error&diff=prev&oldid=638992587
I tried reverting it. Hope this helps. 81.109.93.98 ( talk) 06:37, 25 March 2015 (UTC)
Ruruf 49.37.69.74 ( talk) 14:52, 15 February 2022 (UTC)
For compiled languages, syntax errors are detected at compile-time. A program will not compile until all syntax errors are corrected. For 110.225.235.203 ( talk) 14:03, 17 March 2022 (UTC)
This is the
talk page for discussing improvements to the
Syntax error article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
![]() | This article has not yet been rated on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||
|
![]() | This article links to one or more target anchors that no longer exist.
Please help fix the broken anchors. You can remove this template after fixing the problems. |
Reporting errors |
This was in the article as a syntax error, but I think it would compile okay:
Example of a syntaxlogic error in C:
static char *days[] = {"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
int i;
for(i=0;i<7;i++) printf("Day %d: %d\n",i,days[i]);
In the above example, days[i]'s memory location in integer form is printed and not the string it contains, producing unexpected results but not failing the program.
Correct code: to output correct result instead of second %d conversion must be %s conversion sign: printf("Day %d: %s\n",i,days[i]);.
Let's come up with a better example of a syntax error. -- Uncle Ed 17:36, 16 November 2006 (UTC)
Insert non-formatted text here
"In computer science a syntax error refers to an error in the syntax" - well no shit surlock
Hello everybody, I am not experienced in Javascript, so I just wanted to ask: Is it a syntax error when you call on a variable without defining its value? I think it might be a Name Error.
I'm not sure where to mention this - or if I should at all - but this revision looked pretty nasty:
https://en.wikipedia.org/?title=Syntax_error&diff=prev&oldid=638992587
I tried reverting it. Hope this helps. 81.109.93.98 ( talk) 06:37, 25 March 2015 (UTC)
Ruruf 49.37.69.74 ( talk) 14:52, 15 February 2022 (UTC)
For compiled languages, syntax errors are detected at compile-time. A program will not compile until all syntax errors are corrected. For 110.225.235.203 ( talk) 14:03, 17 March 2022 (UTC)