ASCII control characters: Difference between revisions

Content added Content deleted
m (→‎{{Header|perl}}: Inserted missing \N{ff} character.)
(Added FreeBasic)
Line 44: Line 44:
import std.ascii.ControlChar;
import std.ascii.ControlChar;
</syntaxhighlight>
</syntaxhighlight>

=={{header|FreeBASIC}}==
<syntaxhighlight lang="vb">Enum AsciiControlChar
NUL = &H00 'Null
SOH = &H01 'Star of Header
STX = &H02 'Start of Text
ETX = &H03 'End of Text
EOT = &H04 'End of Transmission
ENQ = &H05 'Enquiry
ACK = &H06 'Acknowledge
BEL = &H07 'Bell
BS = &H08 'BackSpace
HT = &H09 'Horizontal Tabulation
LF = &H0A 'Line Feed
VT = &H0B 'Vertical Tabulation
FF = &H0C 'Form Feed
CR = &H0D 'Carriage Return
SO = &H0E 'Shift Out
SI = &H0F 'Shift In
DLE = &H10 'Data Link Escape
DC1 = &H11 'Device Control 1 (XON)
DC2 = &H12 'Device Control 2
DC3 = &H13 'Device Control 3 (XOFF)
DC4 = &H14 'Device Control 4
NAK = &H15 'Negative acknowledge
SYN = &H16 'Synchronous Idle
ETB = &H17 'End of Transmission Block
CAN = &H18 'Cancel
EM = &H19 'End of Medium
SUB_ = &H1A 'Substitute
ESC = &H1B 'Escape
FS = &H1C 'File Separator
GS = &H1D 'Group Separator
RS = &H1E 'Record Separator
US = &H1F 'Unit Separator
SP = &H20 'Space
DEL = &H7F 'Delete
End Enum

Print(Hex(AsciiControlChar.CR))
Print(Hex(AsciiControlChar.DEL))
Sleep</syntaxhighlight>
{{out}}
<pre> D
7F</pre>

=={{Header|perl}}==
=={{Header|perl}}==
<syntaxhighlight lang="perl">
<syntaxhighlight lang="perl">