ASCII control characters: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
mNo edit summary
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
(2 intermediate revisions by 2 users not shown)
Line 362:
(CNTRL.nul, CNTRL.ht, CNTRL.us, CNTRL.del) = (0, 9, 31, 127)
</pre>
 
=={{header|Maxima}}==
Those character can be put in a list and can be found their ASCII numbers.
<syntaxhighlight lang="maxima">
/* List of characters that are not constituents (constituent is a graphic character but not a space character) */
block(makelist(ascii(i),i,0,127),sublist(%%,lambda([x],not constituent(x))));
/* [,"�","�","�","�","�","�","�","�","�","
","�","�","
","�","�","�","�","�","�","�","�","�","�","�","�","�","�","�","�","�","�"," ","�"] */
 
/* Ascii numbers of characters that are not constituents */
map(cint,%);
/* [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,127] */
</syntaxhighlight>
 
=={{header|Nim}}==
Line 455 ⟶ 469:
Ord: 127, Unicode: <control-007F>, Enum: ␡
</pre>
 
=={{header|RPL}}==
There is no enum in RPL, but we can create global variables, each containing a specific control character, which are then available to all programs in the same directory tree.
≪ { NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US }
0 31 '''FOR''' ctrl
ctrl CHR OVER ctrl GET STO
'''NEXT''' DROP
127 CHR 'DEL' STO
≫ '<span style="color:blue">→ASCII</span>' STO
 
=={{header|V (Vlang)}}==
Line 512 ⟶ 535:
 
Here, we create instead a ''Group'' which can contain any values in any order.
<syntaxhighlight lang="ecmascriptwren">import "./dynamic" for Group
 
var names = [
9,485

edits