Empty string: Difference between revisions

add gwbasic
(≢ is shape, not rank)
(add gwbasic)
Line 1,277:
s = '1 is the loneliest number'
assert !s.empty</lang>
 
=={{header|GW-BASIC}}==
<lang gwbasic>10 DIM S1$ 'implicitly defined empty string
20 S2$ = "" 'explicitly defined empty string
30 S3$ = "Foo bar baz"
40 S$=S1$ : GOSUB 200
50 S$=S2$ : GOSUB 200
60 S$=S3$ : GOSUB 200
70 END
200 IF LEN(S$)=0 THEN PRINT "Empty string" ELSE PRINT "Non-empty string"
210 RETURN</lang>
 
=={{header|Harbour}}==
Line 1,287 ⟶ 1,298:
? cString
ENDIF</lang>
 
 
 
=={{header|Haskell}}==
781

edits