Character codes: Difference between revisions

m
Line 19:
</pre>
=={{header|ALGOL 68}}==
In ALGOL 68 the FORMAT'''format''' $g$ is type aware, hence the type conversion operators ABS'''abs''' & REPR'''repr''' are used to set the type.
<lang algol68>main:(
printf(($gl$, ABS "a")); # for ASCII this prints "+97" EBCDIC prints "+129" #
Line 31:
make conv(tape, ebcdic conv);
FOR record DO getf(tape, ( ~ )) OD; ~ # etc ... #</lang>
Every CHANNEL'''channel''' has an associated standard character conversion that can be determined
using the ''stand conv'' query routine and then the conversion applied to a particular
file/tape. eg.