C preprocessor

This is a discussion on C preprocessor within the C Programming forums, part of the General Programming Boards category; I saw in a document ,which says that (it was on C preprocessor) the OS will set a macro names ...

  1. #1
    Unregisterd
    Guest

    Unhappy C preprocessor

    I saw in a document ,which says that (it was on C preprocessor) the OS will set a macro names SYSTEM which will be equal to the OS currently running. For example if it is a MS-DOS system , SYSTEM will qual to MSDOS, and the example given was,
    #if SYSTEM==MSDOS
    .
    .
    .

    How true is the fact that the OS sets a macro named SYSTEM. Pls explain.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,497
    > How true is the fact that the OS sets a macro named SYSTEM.
    Not true at all generally speaking. Any such macro name would be set by the compiler, and as such would be compiler specific.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C/C++ preprocessor directives
    By coletek in forum C++ Programming
    Replies: 11
    Last Post: 01-11-2009, 03:24 PM
  2. Writing an HTML Preprocessor
    By thetinman in forum C++ Programming
    Replies: 1
    Last Post: 09-17-2007, 08:01 AM
  3. Preprocessor Directives Problem
    By MipZhaP in forum C++ Programming
    Replies: 6
    Last Post: 02-18-2005, 12:53 PM
  4. Preprocessor string pasting fun
    By ggambett in forum C Programming
    Replies: 6
    Last Post: 11-11-2004, 05:40 PM
  5. Preprocessor Functions
    By mart_man00 in forum C Programming
    Replies: 2
    Last Post: 01-09-2003, 08:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21