Empty string: Difference between revisions
Added an Algol 68 sample
(→{{header|Julia}}: A new entry for Julia) |
(Added an Algol 68 sample) |
||
Line 44:
....
}</lang>
=={{header|ALGOL 68}}==
{{works with|ALGOL 68G|Any - tested with release 2.8.win32}}
<lang algol68># declare a string variable and assign an empty string to it #
STRING s := "";
# test the string is empty #
IF s = "" THEN write( ( "s is empty", newline ) ) FI;
# test the string is not empty #
IF s /= "" THEN write( ( "s is not empty", newline ) ) FI;
# as a string is an array of characters, we could also test for emptyness by #
# checking for lower bound > upper bound #
IF LWB s > UPB s THEN write( ( "s is still empty", newline ) ) FI</lang>
=={{header|AutoHotkey}}==
|