A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
16
Task/Empty-string/Icon/empty-string.icon
Normal file
16
Task/Empty-string/Icon/empty-string.icon
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
s := "" # null string
|
||||
s := string('A'--'A') # ... converted from cset difference
|
||||
s := char(0)[0:0] # ... by slicing
|
||||
|
||||
s1 == "" # lexical comparison, could convert s1 to string
|
||||
s1 === "" # comparison won't force conversion
|
||||
*s1 = 0 # zero length, however, *x is polymorphic
|
||||
*string(s1) = 0 # zero length string
|
||||
|
||||
s1 ~== "" # non null strings comparisons
|
||||
s1 ~=== ""
|
||||
*string(s1) ~= 0
|
||||
|
||||
s := &null # NOT a null string, null type
|
||||
/s # test for null type
|
||||
\s # test for non-null type
|
||||
Loading…
Add table
Add a link
Reference in a new issue