Empty string: Difference between revisions

Content added Content deleted
m (bbc basic and bracmat were in wrong order)
Line 82: Line 82:
Is b not empty ? 1
Is b not empty ? 1
</pre>
</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}}==
=={{header|Bracmat}}==
Line 94: Line 105:
& !d:~ { neither is d an empty string }
& !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>
</lang>