"John" <so*****@microsoft.comwrites:
Was curious if anyone codes C on a mainframe in TSO/ISPF and, if so, what
they've done to get brackets ( [] ) recognized by both their terminal
emulator and ISPF itself.
One workaround is to use trigraphs. ??( is translated to [, and ??)
is translated to ]. This happens in an early translation phase, so
the translation occurs even in character constants and string
literals. The drawback of trigraphs is that they're ugly (and their
mother dresses them funny). You might need a compiler option to tell
your compiler to recognize them.
Or you can use digraphs. <: is equivalent to [, and :is equivalent
to ], assuming your compiler supports them. (Trigraphs were added in
the 1989 ANSI C standard; I think digraphs were added in an amendment
in 1995). They're slightly (but only slightly) less ugly than
trigraphs, and they're handled in a later translation phase, so the
string literal "<:" still consists of two characters, '<' and ':'.
Or you can use some system-specific solution that I know nothing
about. (Dann Corbit suggested asking in bit.listserv.ibm-main.)
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.