Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View 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")))

View file

@ -0,0 +1,6 @@
define variable emptystring = "" ;binds variable'emptystring' to the empty string ""
if emptystring = "" then
print "is empty string"
else
print "is not empty string"

View file

@ -0,0 +1,10 @@
;nyquist plug-in
;version 4
;type tool
;name "Empty string"
(setq emptystring "") ;; Define global variable
(if (string= emptystring "") ;;case sensitive string comparison
"The string is empty."
"The string is not empty.")

View file

@ -0,0 +1,12 @@
;nyquist plug-in
;version 4
;codetype sal
;type tool
;name "Empty string"
define variable emptystring = "a" ;; Define global variable
;; The ternary operator is #?
return #?(emptystring = "",
"The string is empty.",
"The string is not empty.")