Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Character-codes/CLU/character-codes.clu
Normal file
11
Task/Character-codes/CLU/character-codes.clu
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
start_up = proc ()
|
||||
po: stream := stream$primary_output()
|
||||
|
||||
% To turn a character code into an integer, use char$c2i
|
||||
% (but then to print it, it needs to be turned into a string first
|
||||
% with int$unparse)
|
||||
stream$putl(po, int$unparse( char$c2i( 'a' ) ) ) % prints '97'
|
||||
|
||||
% To turn an integer into a character code, use char$i2c
|
||||
stream$putc(po, char$i2c( 97 ) ); % prints 'a'
|
||||
end start_up
|
||||
Loading…
Add table
Add a link
Reference in a new issue