What does it mean? (??) in C for iSeries

I am tasked with converting a C program from iSeries / AS400 to .NET. It has been a while since I looked at C and I have never used C on iSeries before. I see elements like

main(int argc, char *argv ??(??))

I'm not sure ??? for. Based on the usage here, I would suggest that this is for arrays, but wanted to make sure before going the wrong way.

+4
source share
2 answers

??( equivalent to [ , but ??) equivalent to ] . These are called trigraphs, and they are replaced by a preprocessor before anything else is done with the code. Here is a list of other trigraphs.

+7
source

It is called Trigraph :

C11 (ISO / IEC 9899: 201x) Β§5.2.1.1 Triangle sequences

Before any other processing occurs, each occurrence of one of the following sequences of three characters (called the sequences of the trigraph17) is replaced by the corresponding single character.

 ??= # ??( [ ??/ \ ??) ] ??' ^ ??< { ??! | ??> } ??- ~ 

So the code

 main(int argc, char *argv ??(??)) 

turns into

 main(int argc, char *argv []) 
+3
source

Source: https://habr.com/ru/post/1494762/


All Articles