REBOL 3 Docs | Guide | Concepts | Functions | Datatypes | Errors |
TOC < Back Next > | Updated: 3-Aug-2010 Edit History |
Constructs a specified datatype.
Arguments:
type [any-type!] - The datatype or example value
spec [any-type!] - The attributes of the new value
See also:
The TYPE argument indicates the datatype to create.
The form of the constructor is determined by the datatype. For most series datatypes, a number indicates the size of the initial allocation.
str: make string! 1000
blk: make block! 10
cash: make money! 1234.56
print cash
$1234.560000000000000
time: make time! [10 30 40]
print time
10:30:40
NOTE: MAKE when used with OBJECTS will modify the context of the spec block (as if BIND was used on it). If you need to reuse the spec block use MAKE in combination with COPY/deep like this:
make object! copy/deep spec
TOC < Back Next > | REBOL.com - WIP Wiki | Feedback Admin |