Next: , Previous: , Up: AT commands   [Contents][Index]


5.6 Conversion to ASCII

Several commands are useful for generating machine-independent code. For example, FWEB works internally with the ASCII character set, so uses these commands heavily to convert from the possibly non-ASCII native character set of the machine on which FWEB is running.

5.6.1 ‘@'’: Convert character to ASCII

The construction ‘@'c'’ converts ‘c’ to its ASCII value. In C and C++, it is converted to octal; for example, ‘@'A'’ is output as ‘0101’. In FORTRAN and RATFOR, it is converted to decimal; the previous example would be output as ‘65’.

If the native character set of one’s machine is ASCII, the conversion will not be done unless the ‘-A’ command-line option is used. See -A_.