- (wait 'cnt|NIL . prg) -> any
- Waits for a condition. While the result of the execution of prgisNIL, aselectsystem call is executed for all file
descriptors and timers in theVALof the global variable*Run. Whencntis
non-NIL, the waiting time is limited tocntmilliseconds. Returns the result ofprg. See alsokeyandsync.
: (wait 2000)                                # Wait 2 seconds
-> NIL
: (prog
   (zero *Cnt)
   (setq *Run                                # Install background loop
      '((-2000 0 (println (inc '*Cnt)))) )   # Increment '*Cnt' every 2 sec
   (wait NIL (> *Cnt 6))                     # Wait until > 6
   (off *Run) )
1                                            # Waiting ..
2
3
4
5
6
7
-> NIL
 
- (week 'dat) -> num
- Returns the number of the week for a given datedat. See alsoday,ultimo,datStrandstrDat.
: (datStr (date))
-> "2007-06-01"
: (week (date))
-> 22
 
- (when 'any . prg) -> any
- Conditional execution: When the condition anyevaluates to
non-NIL,prgis executed and the result is returned.
OtherwiseNILis returned. See alsounless,if,andandcond.
: (when (> 4 3) (println 'OK) (println 'Good))
OK
Good
-> Good
 
- (while 'any . prg) -> any
- Conditional loop: While the condition anyevaluates to
non-NIL,prgis repeatedly executed. Ifprgis never executed,NILis returned. Otherwise the
result ofprgis returned. See alsountil,for,loopanddo.
: (while (read)
   (println 'got: @) )
abc
got: abc
1234
got: 1234
NIL
-> 1234
 
- (what 'sym) -> lst
- (Debug mode only) Returns a list of all internal symbols that match the
pattern string sym. See alsomatch,who,hasandcan.
: (what "cd@dr")
-> (cdaddr cdaadr cddr cddddr cdddr cddadr cdadr)
 
- (who 'any) -> lst
- (Debug mode only) Returns a list of all functions or method definitions that
contain the atom or pattern any. See alsomatch,what,hasandcan.
: (who 'caddr)                         # Who is using 'caddr'?
-> ($dat lint1 expDat datStr $tim tim$ mail _gen dat$ datSym)
: (who "Type error")
-> ((mis> . +Link) *Uni (mis> . +Joint))
: (more (who "Type error") pp)         # Pretty print all results
(dm (mis> . +Link) (Val Obj)
   (and
      Val
      (nor (isa (: type) Val) (canQuery Val))
      "Type error" ) )
.                                      # Stop
-> T
 
- (wipe 'sym|lst) -> sym|lst
- Clears the VALand the property list ofsym, or of
all symbols in the listlst. When a symbol is an external symbol,
its state is also set to "not loaded". Does nothing whensymis an
external symbol that has been modified or deleted ("dirty").
: (setq A (1 2 3 4))
-> (1 2 3 4)
: (put 'A 'a 1)
-> 1
: (put 'A 'b 2)
-> 2
: (show 'A)
A (1 2 3 4)
   b 2
   a 1
-> A
: (wipe 'A)
-> A
: (show 'A)
A NIL
-> A
 
- (with 'sym . prg) -> any
- Saves the current object Thisand sets it to the new valuesym. Thenprgis executed, andThisis
restored to its previous value. The return value is the result ofprg. Used typically to access the local data ofsymin
the same manner as inside a method body.prgis not executed (andNILis returned) whensymisNIL.(with 'X . prg)is equivalent to(let? This 'X . prg).
: (put 'X 'a 1)
-> 1
: (put 'X 'b 2)
-> 2
: (with 'X (list (: a) (: b)))
-> (1 2)
 
- (wr 'cnt ..) -> cnt
- Writes all cntarguments as raw bytes to the current output
channel. See alsordandpr.
: (out "x" (wr 1 255 257))  # Write to "x"
-> 257
: (hd "x")
00000000  01 FF 01                                         ...
-> NIL
 
- (wrap 'cnt 'lst) -> sym
- Returns a transient symbol with all characters in lstpacked in lines with a maximal length ofcnt. See alsotab,alignandcenter.
: (wrap 20 (chop "The quick brown fox jumps over the lazy dog"))
-> "The quick brown fox^Jjumps over the lazy^Jdog"
: (wrap 8 (chop "The quick brown fox jumps over the lazy dog"))
-> "The^Jquick^Jbrown^Jfox^Jjumps^Jover the^Jlazy dog"