unstr
From the SETL Wiki
| unstr | |
|---|---|
| Category | string |
| Syntax | prefix |
| Compatibility | |
| CIMS SETL | no |
| SETL-S | no |
| SETL2 | yes |
| GNU SETL | yes |
Contents |
Purpose
Parse a string representation of any SETL value.
Synopsis
unstr x
Description
Given a string representation of o SETL value (the same as would be generated by str or written to a file by printa, returns that value.
Examples
-
unstr '42'
Result: 42
-
unstr '[1 2 2]'
Result: [1, 2, 2]
-
unstr '{1 2 2}'Result: {1, 2}
-
unstr '''a b'''
Result: 'a b' (note: '' is an escaped quote character.)
-
unstr 'a'
Result: 'a'
Notes
- Like reada, unstr cannot recreate an atom from its string representation.
- unstr is a redefinable procedure in SETL2.


