Anonymous user
Empty string: Difference between revisions
→{{header|BASIC}} Add BaCon
No edit summary |
|||
Line 180:
40 IF LEN (A$) = 0 THEN PRINT "THE STRING IS EMPTY"
50 IF LEN (A$) THEN PRINT "THE STRING IS NOT EMPTY"</lang>
==={{header|BaCon}}===
The literal empty string in BaCon is <tt>""</tt>.
<lang freebasic>' Empty string
a$ = ""
IF a$ = "" THEN PRINT "Empty string"
IF a$ != "" THEN PRINT "Non empty string"</lang>
There are other ways, such as a zero return from the <tt>LEN(s$)</tt> or <tt>ULEN(utf$)</tt> functions. <tt>EQUAL(s$, "")</tt> would be another way.
=={{header|Batch File}}==
|