XLISP psetq

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference

# psetq

Type: | - | special form (fsubr)
Source: | - | xlcont.c

## Syntax

(psetq [symbol expr] ... )
  symbol - un-evaluated symbol
  expr - value for symbol
  returns - the value from the last expr

## Description

'psetq' sets 'expr' as the value of 'symbol'. There can be several pairs of assignment. 'psetq' performs these assignments in parallel, the 'symbols' are not assigned new values until all the 'exprs' have been evaluated. 'psetq' returns the value from the last 'expr' as it's result.

## Examples

    (psetq a 1)              ; symbol A gets value 1
    (psetq b '(a b c))       ; symbol B gets value (A B C)
    (psetq mynum (+ 3 4))    ; symbol MYNUM gets value 7

    (setq goo 'ber)          ; returns BER
    (setq num 1)             ; returns 1
    (psetq goo num num goo)  ; returns BER
    (print goo)              ; returns 1
    (print num)              ; returns BER

See the psetq special form in the XLISP 2.0 manual.

Back to Top

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference