RosettaCodeData/Task/Empty-string/MSX-Basic/empty-string.basic

13 lines
363 B
Plaintext

100 CLS : REM 100 HOME for Applesoft BASIC
110 LET S$ = ""
120 GOSUB 160
130 LET S$ = "not empty"
140 GOSUB 160
150 END
160 REM isEmpty
170 IF LEN(S$) = 0 THEN PRINT "String is empty"
180 IF LEN(S$) <> 0 THEN PRINT "String is not empty"
190 IF S$ = "" THEN PRINT "yes, the string is empty"
200 IF S$ <> "" THEN PRINT "no, the string is not empty"
210 RETURN