Empty string: Difference between revisions
m
bbc basic and bracmat were in wrong order
m (bbc basic and bracmat were in wrong order) |
|||
Line 82:
Is b not empty ? 1
</pre>
=={{header|BBC BASIC}}==▼
<lang bbcbasic> REM assign an empty string to a variable:▼
var$ = ""▼
REM Check that a string is empty:▼
IF var$ = "" THEN PRINT "String is empty"▼
REM Check that a string is not empty:▼
IF var$ <> "" THEN PRINT "String is not empty"▼
</lang>▼
=={{header|Bracmat}}==
Line 94 ⟶ 105:
& !d:~ { neither is d an empty string }
)
▲</lang>
▲=={{header|BBC BASIC}}==
▲<lang bbcbasic> REM assign an empty string to a variable:
▲ var$ = ""
▲ REM Check that a string is empty:
▲ IF var$ = "" THEN PRINT "String is empty"
▲ REM Check that a string is not empty:
▲ IF var$ <> "" THEN PRINT "String is not empty"
</lang>
|