Empty string: Difference between revisions

m
Applesoft BASIC
(Kotlin snippet)
m (Applesoft BASIC)
Line 161:
30 IF A$<>"" THEN PRINT "THE STRING IS NOT EMPTY"
40 END</lang>
==={{header|Applesoft BASIC}}===
The terminating quote may be left off. By default, strings are initially empty so the assignment is not necessary. Another way to check for an empty string is to use the LEN function.
<lang basic> 10 LET A$ = "
40 IF LEN (A$) = 0 THEN PRINT "THE STRING IS EMPTY"
50 IF LEN (A$) THEN PRINT "THE STRING IS NOT EMPTY"</lang>
 
=={{header|Batch File}}==
413

edits