I'm a very experienced C programmer, but recently I came across some code on a mainframe that has a local variable. This is in a simple C function that declares this variable, and then strcpy
/ strcat
s two strings into it, and then tries an fopen
.
char foo(|10|);
This code is very old. Possibly even K&R C old. I'm wondering if this is some obscure compiler extension or an adaptation to a keyboard that doesn't have [] or something like that.
Anyone know if this declaration is 'special'?
This is a standard Z/OS mainframe. I'm not sure what compiler is used.
[ ]
characters, so a C compiler meant to work on EBCDIC source may well have had to define some substitute. – Cannes|
as not necessarily present. – Fellmonger