Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
13
Task/Empty-string/Nyquist/empty-string-1.nyquist
Normal file
13
Task/Empty-string/Nyquist/empty-string-1.nyquist
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
(setf emptystring "") ;binds variable'emptystring' to the empty string ""
|
||||
|
||||
(let ((emptystring "")) ;; Binds local variable 'emptystring' to the empty string ""
|
||||
(when (string-equal emptystring "") ;;case insensitive string comparison
|
||||
(print "Is an empty string")) ;;bad argument error if not a string
|
||||
(when (stringp emptystring)
|
||||
(print "Is a string"))
|
||||
(when (not (stringp emptystring))
|
||||
(print "Is not a string"))
|
||||
(when (and (stringp emptystring)(= (length emptystring) 0))
|
||||
(print "Is an empty string"))
|
||||
(when (and (stringp emptystring)(> (length emptystring) 0))
|
||||
(print "Is a non-empty string")))
|
||||
Loading…
Add table
Add a link
Reference in a new issue