'?' charater in variable name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • deepakcusat1
    New Member
    • Apr 2007
    • 2

    '?' charater in variable name

    please help me in understanding the below declaration

    char f_d_pd??(120??) ;

    what this declaration means.
    another thing can we use ? in variable name.
    i have compile below code fragment with cc compiler on HP-UX

    int main(){
    char f_d_pd??(120??) ;
    }

    There is no compilation error for this.

    Thanks in advance ..
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by deepakcusat1
    please help me in understanding the below declaration

    char f_d_pd??(120??) ;

    what this declaration means.
    another thing can we use ? in variable name.
    i have compile below code fragment with cc compiler on HP-UX

    int main(){
    char f_d_pd??(120??) ;
    }

    There is no compilation error for this.

    Thanks in advance ..
    Those are trigraph sequences ??( and ??( represent [ and ] respectively.
    The trigraphs were intrudoced for non-ANSI keyboards that lacked, e.g.
    those square brackets. Here are all the available trigraphs:
    Code:
                ??=     #         ??)     ]         ??!     |
                ??(     [         ??'     ^         ??>     }
                ??/     \         ??<     {         ??-     ~
    kind regards,

    Jos

    Comment

    • xoinki
      New Member
      • Apr 2007
      • 110

      #3
      i didnt know this..
      thnx for d info

      Comment

      • deepakcusat1
        New Member
        • Apr 2007
        • 2

        #4
        Thanks a lot

        Comment

        • svlsr2000
          Recognized Expert New Member
          • Feb 2007
          • 181

          #5
          In one of the site i read about difference between c and c++. it has few digraph sequence, i tried google to find more digraph sequnce( if they were any more :) )
          but i couldn't find. can any one tell is there any other digraph sequences and if any what are they.
          Which are the compilers which support them?

          Comment

          • svlsr2000
            Recognized Expert New Member
            • Feb 2007
            • 181

            #6
            Originally posted by svlsr2000
            In one of the site i read about difference between c and c++. it has few digraph sequence, i tried google to find more digraph sequnce( if they were any more :) )
            but i couldn't find. can any one tell is there any other digraph sequences and if any what are they.
            Which are the compilers which support them?
            http://david.tribble.c om/text/cdiffs.htm#C90-digraph

            Comment

            Working...