Empty string: Difference between revisions
Content added Content deleted
(Empty string in various BASIC dialents (BASIC256, True BASIC, QBasic and Yabasic)) |
(Empty string en Asymptote) |
||
Line 381: | Line 381: | ||
the string is not empty |
the string is not empty |
||
no, the string is not empty</pre> |
no, the string is not empty</pre> |
||
=={{header|Asymptote}}== |
|||
<lang Asymptote>string c; //implicitly assigned an empty string |
|||
if (length(c) == 0) { |
|||
write("Empty string"); |
|||
} else { |
|||
write("Non empty string"); |
|||
} |
|||
string s = ""; //explicitly assigned an empty string |
|||
if (s == "") { |
|||
write("Empty string"); |
|||
} |
|||
if (s != "") { |
|||
write("Non empty string"); |
|||
} |
|||
string t = "not empty"; |
|||
if (t != "") { |
|||
write("Non empty string"); |
|||
} else { |
|||
write("Empty string"); |
|||
}</lang> |
|||
{{out}} |
|||
<pre>Empty string |
|||
Empty string |
|||
Non empty string</pre> |
|||
=={{header|AutoHotkey}}== |
=={{header|AutoHotkey}}== |