(str-cat "use" "ful" "ness") (sym-cat use ful ness) (str-index "def" "abcdefghi") (sub-string 4 6 "abcdefghijkl") (upcase "This is a test of upcase") (lowcase A_Word_Test_for_Lowcase)
(create$) ;() (create$ a b c d e f) ;(a b c d e f)first$
(first$ (create$ a b c d) ) ;(a)rest$
(rest$ (create$ a b c d) ) ;(b c d)length$
(length$ (create$ a b c d) ) ;4nth$
(nth$ 3 (create$ a b c d e f g)) ;cmember$
(member$ blue (create$ red 3 "text" 8.7 blue)) ;5 (member$ 4 (create$ red 3 "text" 8.7 blue)) ;FALSEsubsetp
(subsetp (create$ hammer saw drill) (create$ hammer drill wrench pliers saw)) ;TRUEsubseq$
(subseq$ (create$ hammer drill wrench pliers) 3 4) ;(wrench pliers)explode$
(explode$ "a b c d") ;(a b c d)implode$
(implode$ (create$ a b c d e)) ;"a b c d e"expand$
(printout t (expand$ (create$ a b c))) ;abc (printout t (create$ a b c)) ;(a b c)insert$
(insert$ (create$ a e f) 2 (create$ b c d)) ;(a b c d e f)delete$
(delete$ (create$ a b c d e f) 3 4) ;(a b e f)replace$
(replace$ (create$ a b c d) 2 3 x y (create$ q r s)) ;(a x y q r s d)
Trigonometric Hyperbolic Conversion (deg-rad 180) (rad-deg 3.141592653589793) (exp 1) (log 2.718281828459045)
=, <>, >, <, >=, <= numberp floatp integerp oddp evenp
and, or, not eq, neq stringp symbolp lexemep multifieldp
(gensym*) ;return a unique word gen<number> each time it's called. (setgen 5) ;to set starting number used by gensym
(defrule player-select (phase choose-player) => (printout t "Who moves first (Computer: c " "Human: h)? ") (assert (player-select (read))))
(open "input.dat" data "r") ;"r" for read only ;"r+" for read/write ;"a" for append only ;"w" for write only
(open "example.dat" xmp "w") (printout xmp "green" crlf) (printout xmp 7 crlf) (close xmp) (open "example.dat" xmp "r") (read xmp) (read xmp) (close xmp)
(format t "Name: %-15s Age: %3d" "Bob Green" 35) (bind ?name (format nil "Name: %-15s Age: %3d" "Bob Green" 35)) (printout t ?name)
(readline xmp)
Previous Advanced Pattern Matching Up TOC Next Procedural Programming