Re: C syntax errors
Mark S Waterbury <[email protected]>
| Newsgroups | gmane.comp.lang.as400.c |
|---|---|
| Organization | ISS |
| Message-ID | <[email protected]> |
Hi, Frank: Not making any excuses for C -- but this web site and examples seem to be based on "K & R" C -- and no mention of "Second Edition" (aka. ANSI C) -- so that would be the early C language as defined by Dennis Ritchie in the early versions of Unix. The early C language had plenty of ambiguities that were only later resolved as part of the ANSI standardization process. I don't think the IBM ILE C compiler even claims to support that early dialect of C. The ILE C compiler does have an *ANSI option for the LANGLVL parameter. But no mention of any earlier dialects. And I am not even sure these examples would even compile, even if you could find an old C compiler from that era (we are talking about the later half ot he 1970s.) =-O Good luck, Mark S. Waterbury > On 1/17/2014 5:38 PM, frank kolmann wrote: > I am new to C. > > Given that C compilers throw up Syntax errors at seemingly random places, > how do experienced programmers cope? > Any advice will be most welcome. > -rant on- > To me C is the antithesis of the KISS principal. Given the convolutions > possible in C code I wonder how are any C programs written at all. > It seems that you need an ability to decompile C code in your head. The > forwards and backwards nature of deciphering a C definition is so arcane > that the only reason I can think why anyone would have designed such a > language is to show 'look at me, arnt I clever'. > C macro substitution seems to be a disaster waiting to happen. Who is > clever enough to construct a macro that can accept arbitrary input and yet > produce reliable results. > -rant off- > I fact I am trying to compile a bit of C code I found on the net that > attempts to translate C constructs into words but it fails on the iSeries > with a syntax error. > Presumable it has compiled elsewhere. > http://www.c-program-example.com/2012/02/k-r-c-programs-exercise-5-20.html > > I though I was a programmer, I know Basic Fortran Cobol RPG(all variants) > but I realise now that I am just a mere dabbler and there exist super > beings with mystical abilities akin to sorcerers who program in C. > > Frank Kolmann -- This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list To post a message email: C400-L-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/c400-l or email: C400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/c400-l.