Re: C IDE Recommendations



Flash Gordon wrote:
Keith Thompson wrote:
Jonathan Pritchard <jonpritchard@xxxxxxx> writes:
Keith Thompson wrote:
Jonathan Pritchard <jonpritchard@xxxxxxx> writes:
[...]
Keith, which standard do you try and adhere to? Or more generally
which should you try and adhere too, if you would like to be able to
easily port code to Linux/Windows/Mac?
I usually try to stick to C90, avoiding anything that would be
incompatible with C99 (for example, using "restrict" as an
identifier). I think that's pretty much what youa have to do if you
want maximal portability. Many compilers support *parts* of C99, but
not necessarily the same parts.
Thanks, I appreciate it. I don't want to be learning the wrong ways to
do things.

Let me add that you should get advice about this from more people than
just me.

Maximum portability isn't always the most important thing. For
example, a lot of programmers might be able to assume that their code
only needs to be compilable with recent releases of gcc; others might
be able to assume POSIX support, or Windows, or whatever. Or you
might find the advantages of "//" comments more important than the
risk that a strict C90 compiler won't support them.

I agree with Keith. In addition, you might have to do things which cannot be done without extensions to C. However, when doing this you should try to keep your system specific pats isolated from the rest of the code. This will ease porting if/when you need to and generally also lead to a better program structure.

Thanks Flash and Keith

--
Reclaim Your Inbox! http://www.mozilla.org/products/thunderbird
.



Relevant Pages

  • Re: C IDE Recommendations
    ... Keith Thompson wrote: ... Many compilers support *parts* of C99, ... be able to assume POSIX support, or Windows, or whatever. ... This will ease porting if/when you need to and generally also lead to a better program structure. ...
    (comp.lang.c)
  • Re: C IDE Recommendations
    ... easily port code to Linux/Windows/Mac? ... want maximal portability. ... Many compilers support *parts* of C99, ... be able to assume POSIX support, or Windows, or whatever. ...
    (comp.lang.c)
  • ANN: kbmMemTable v. 4.05 released
    ... - Added support for sfLoadIndexDef in sfIndexDef in binary and csv streamformats. ... (LEVEL6+ compilers only). ... This allows for the index to show or filter specific updatestatus settings incl. ... Reported by Rado Antloga. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Very basic Fortran compiler question
    ... For whatever reasons, ... > Fortran compilers, I've turned in problem reports and gotten ... > have not had such good support experiences with are no longer ... I would say that the primary criteria for determining what software to ...
    (comp.lang.fortran)
  • the 5 questions...with my comments/answers
    ... > only compiler left: Delphi. ... We are still building compilers. ... > Borland itself shows that is very dangerous thing. ... We are supporting .NET just as we support MS ...
    (borland.public.delphi.non-technical)