(set 'symbol statement)
Assign the statement to the symbol.
This function is an assignment function, similar to the setq function. Set assigns the statement argument to symbol. The symbol should be quoted. When left unquoted, it changes the values of previously assigned symbols.
Examples
| Code | Returns |
|---|---|
| (set 'x 56) | 56 |
| (set 'y "Hello") | "Hello" |
| (set 'z '(a b c d)) | (A B C D) |
NOTE The difference between the set function and the setq function is that set evaluates the symbol. The following are equivalent expressions:
(set 'i "Me")
(setq i "Me")
en
italiano
čeština
Deutsch
français
hrvatski
magyar
polski
српски
русский
中文
中文
한국어
español