Prev: System Calls
Next: Warning to newbies
From: Alf P. Steinbach on 17 Mar 2010 10:17 * Patricia Shanahan: > Ahem A Rivet's Shot wrote: >> On Wed, 17 Mar 2010 07:03:43 -0500 >> jmfbahciv <jmfbahciv(a)aol> wrote: >> >>> Jonathan de Boyne Pollard wrote: >> >>>> Such edicts make one want to write code in the form >>>> >>>> x /* The variable x */ >>>> = /* is assigned */ >>>> x /* its value * / >>>> + /* plus * / >>>> 2 /* one */ >>>> ; /* . */ >>>> >>> And would make all tapes spill over to two magtapes. >>> >>> Fortunately, your code would produce many detected errors. >> >> Nope that's perfectly valid C code - provided that x is declared in >> scope. >> > > This sort of thing is one of the strongest arguments for *always* > editing and viewing code in an editor with syntax highlighting for the > source language. The problem and the reason why the compiler would > accept the code both become glaringly obvious. Can't see the invisible u know. Cheers, - Alf
From: Keith Thompson on 17 Mar 2010 11:14 Nick Keighley <nick_keighley_nospam(a)hotmail.com> writes: [...] >> In article <IU.D20100316.T165150.P1185...(a)J.de.Boyne.Pollard.localhost>, >> Jonathan de Boyne Pollard <J.deBoynePollard-newsgro...(a)NTLWorld.COM> wrote: > >> >>> If an obscure technique is being employed, then a comment to that >> >>> effect is a helpful pointer but I have seen _REALLY USEFUL_ comments >> >>> along the following lines ... >> >> >>> x := X + 1 ; increment x >> [...] > > it plainly isn't C. Perhaps in whatever-it-is-written-in cares about > case. > > What *is* it written in? [...] I don't recognize the language, but it was originally posted only to alt.folklore.computers. Somebody decided to add a cross-post to comp.programming and comp.lang.c and didn't bother to mention it. -- Keith Thompson (The_Other_Keith) kst-u(a)mib.org <http://www.ghoti.net/~kst> Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"
From: jackassplus on 17 Mar 2010 11:20 > > What *is* it written in? > > [...] > > I don't recognize the language, but it was originally posted only > to alt.folklore.computers. Somebody decided to add a cross-post > to comp.programming and comp.lang.c and didn't bother to mention it. > pascal uses := as an assignment operator
From: Keith Thompson on 17 Mar 2010 11:33 "jackassplus(a)gmail.com" <jackassplus(a)gmail.com> writes: >> > What *is* it written in? >> >> [...] >> >> I don't recognize the language, but it was originally posted only >> to alt.folklore.computers. Somebody decided to add a cross-post >> to comp.programming and comp.lang.c and didn't bother to mention it. > > pascal uses := as an assignment operator But it doesn't use ; to introduce a comment. Of course, the code could have been incorrect. -- Keith Thompson (The_Other_Keith) kst-u(a)mib.org <http://www.ghoti.net/~kst> Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"
From: Magnum on 17 Mar 2010 12:22
"Keith Thompson" <kst-u(a)mib.org> wrote in message news:lniq8vdktp.fsf(a)nuthaus.mib.org... > "jackassplus(a)gmail.com" <jackassplus(a)gmail.com> writes: >>> > What *is* it written in? >>> >>> [...] >>> >>> I don't recognize the language, but it was originally posted only >>> to alt.folklore.computers. Somebody decided to add a cross-post >>> to comp.programming and comp.lang.c and didn't bother to mention it. >> >> pascal uses := as an assignment operator > > But it doesn't use ; to introduce a comment. > > Of course, the code could have been incorrect. or it could have been notional code in no particular language as the context was the illustration of pointless commenting, and the X instead of x just being a typo? |