Empty string: Difference between revisions
Content added Content deleted
mNo edit summary |
Langurmonkey (talk | contribs) |
||
Line 1,893: | Line 1,893: | ||
=={{header|langur}}== |
=={{header|langur}}== |
||
You can use empty quote marks. |
You can use empty quote marks or you can use the zls token. |
||
<syntaxhighlight lang="langur">val .zls = "" |
<syntaxhighlight lang="langur">val .zls = "" |
||
writeln .zls == "" |
writeln .zls == "" |
||
writeln .zls != "" |
writeln .zls != "" |
||
writeln len(.zls)</syntaxhighlight> |
writeln len(.zls)</syntaxhighlight> |
||
<syntaxhighlight lang="langur">val .zls = zls |
|||
writeln .zls == zls |
|||
writeln .zls != zls</syntaxhighlight> |
|||
{{out}} |
{{out}} |
||
Line 1,903: | Line 1,907: | ||
false |
false |
||
0</pre> |
0</pre> |
||
Also, zero-length strings are non-truthy and other strings are truthy (when used within a Boolean expression / test). |
|||
=={{header|Lasso}}== |
=={{header|Lasso}}== |