I have been tasked with converting a C program from an iSeries/AS400 into .NET. It's been awhile since I've looked at C, and I've never used C on an iSeries before. I'm seeing items such as
main(int argc, char *argv ??(??))
I'm unsure what the ?? is for. Based upon the usage here, I would assume it is for arrays, but wanted to make sure before I go down the wrong path.
??(
is equivalent to [
and ??)
is equivalent to ]
. These are called trigraphs, and they're replaced by the preprocessor before anything else is done with the code. Here's a list of other trigraphs.
It's called Trigraph:
C11(ISO/IEC 9899:201x) §5.2.1.1 Trigraph sequences
Before any other processing takes place, each occurrence of one of the following sequences of three characters (called trigraph sequences17)) is replaced with the corresponding single character.
??= #
??( [
??/ \
??) ]
??' ^
??< {
??! |
??> }
??- ~
So the code
main(int argc, char *argv ??(??))
turns to
main(int argc, char *argv [])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With