Difference between revisions of "Get an ASCII character"
From ArcoWiki
(Created page with "In order to '''get an ASCII character''' from a string it is necessary to use the command <code>CHR(num)</code>.<br/> It returns a string with the length of 1 char which conta...") |
|||
| (3 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
| − | In order to '''get an ASCII character''' from a string it is necessary to use the command <code>CHR(num)</code>.<br/> | + | In order to '''[[get an ASCII character]]''' from a string it is necessary to use the command <code>CHR(num)</code>.<br/> |
It returns a string with the length of 1 char which contains the ASCII character corresponding to the numeric value of 'x' (1 to 255) | It returns a string with the length of 1 char which contains the ASCII character corresponding to the numeric value of 'x' (1 to 255) | ||
| Line 14: | Line 14: | ||
::::<code>TEXT/OUTFIL,st<br/></code> | ::::<code>TEXT/OUTFIL,st<br/></code> | ||
::<code>ENDDO<br/></code> | ::<code>ENDDO<br/></code> | ||
| + | [[it:Ottieni un carattere ASCII]] | ||
| + | [[zh-cn:获取一个ASCII字符]] | ||
| + | [[pt:Obter um personagem ASCII]] | ||
| + | [[de:Erhalte ein ASCII-Zeichen]] | ||
| + | [[es:Obtener un personaje ASCII]] | ||
| + | [[en:Get an ASCII character]] | ||
| + | |||
| + | [[Category:Dmis_Tutorial]] | ||
Latest revision as of 07:42, 7 June 2018
In order to get an ASCII character from a string it is necessary to use the command CHR(num).
It returns a string with the length of 1 char which contains the ASCII character corresponding to the numeric value of 'x' (1 to 255)
$$ Example to print ALL the ASCII characters
DECL/CHAR,50,stDECL/INTGR,iiDISPLY/OFFDISPLY/TERM,V(TEXT)
DO/ii,1,255$$ Assign to the (ii) value the corresponding ASCII characterst=ASSIGN/CHR(ii)st=ASSIGN/CONCAT(STR(ii),' ',st)TEXT/OUTFIL,st
ENDDO