Literals/String: Difference between revisions
Content deleted Content added
m Moved to Basic learning cat |
|||
Line 20: | Line 20: | ||
STRING stringxyz = "xyz"; |
STRING stringxyz = "xyz"; |
||
FORMAT twonewlines = $ll$, threenewpages=$ppp$, fourbackspaces=$bbbb$; |
FORMAT twonewlines = $ll$, threenewpages=$ppp$, fourbackspaces=$bbbb$; |
||
Note: When only uppercase characters sets are available (eg on computers with only |
|||
⚫ | |||
6 bits per "byte") the single quote can used to denote a reserved word. eg |
|||
⚫ | |||
.PR QUOTE .PR |
|||
[]'CHAR' CHARXYZ = "XYZ"; |
|||
⚫ | |||
⚫ | |||
ALGOL 68 also has raw strings called BYTES, this type is a fixed width packed array of CHAR. |
ALGOL 68 also has raw strings called BYTES, this type is a fixed width packed array of CHAR. |
||
BYTES bytesabc = bytes pack("abc"); |
BYTES bytesabc = bytes pack("abc"); |