Something Hard to Google for

Discussion in 'C++' started by jasonwthompson@gmail.com, Aug 29, 2007.

  1. Guest

    I'm working on some code and I noticed that there are functions that
    contain a $ in them. Does anyone know what they mean? I suspect that
    they are macro definitions, but I'm not sure if the $ is legal in a
    macro def.

    Or does a $ have an actual meaning in C/C++?
     
    , Aug 29, 2007
    #1
    1. Advertising

  2. * :
    > I'm working on some code and I noticed that there are functions that
    > contain a $ in them. Does anyone know what they mean? I suspect that
    > they are macro definitions, but I'm not sure if the $ is legal in a
    > macro def.
    >
    > Or does a $ have an actual meaning in C/C++?


    $ is not supported in standard C++ names, but can be supported as a
    language extension.

    A $ in a string, on the other hand, can mean anything or nothing,
    depending on what the string is used for.

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
     
    Alf P. Steinbach, Aug 29, 2007
    #2
    1. Advertising

  3. wrote:
    > I'm working on some code and I noticed that there are functions that
    > contain a $ in them. Does anyone know what they mean? I suspect that
    > they are macro definitions, but I'm not sure if the $ is legal in a
    > macro def.
    >
    > Or does a $ have an actual meaning in C/C++?
    >


    hmmmm... looks like OpenVMS code, isn't it? Folks at digital used it as
    others do with underscore to separate parts of identifiers: SYS$QIO()
    would mean something like QIO function of the SYS library.

    Yet this is not valid in C++ identifiers, gcc does not complain about it
    unless -ansi is passed,
     
    Laurent D.A.M. MENTEN, Aug 29, 2007
    #3
  4. * Laurent D.A.M. MENTEN:
    > wrote:
    >> I'm working on some code and I noticed that there are functions that
    >> contain a $ in them. Does anyone know what they mean? I suspect that
    >> they are macro definitions, but I'm not sure if the $ is legal in a
    >> macro def.
    >>
    >> Or does a $ have an actual meaning in C/C++?
    >>

    >
    > hmmmm... looks like OpenVMS code, isn't it? Folks at digital used it as
    > others do with underscore to separate parts of identifiers: SYS$QIO()
    > would mean something like QIO function of the SYS library.


    As I recall $ was also used in API function names on the HPx000 series
    under MPE/xx.

    Argh, off-topic trivia... :)

    Cheers,

    - Alf

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
     
    Alf P. Steinbach, Aug 29, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Phlip
    Replies:
    7
    Views:
    937
    Dale King
    Apr 15, 2004
  2. Guest
    Replies:
    4
    Views:
    483
    Guest
    Oct 13, 2004
  3. Pekka Järvinen
    Replies:
    2
    Views:
    668
    Richard Tobin
    Apr 29, 2008
  4. Replies:
    1
    Views:
    107
  5. Öö Tiib

    Re: C++ is hard (Google game)

    Öö Tiib, Jan 26, 2014, in forum: C++
    Replies:
    2
    Views:
    103
Loading...

Share This Page