REBOL Document

Make - Function Summary


Constructs and returns a new value.


make type spec


type - The datatype or example value. (must be: any-type)

spec - The attributes of the new value. (must be: any-type)


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

    time: make time! [10 30 40]
    print time


copy - Returns a copy of a value.
type? - Returns a value's datatype.

User Comments:

-From: 2-Dec-2000/9:10:44-8:00:

Warning: If the first argument supplied is object!, or an object, Make modifies the Spec block. If you want to reuse the Spec argument, use Make in combination with copy/deep like:

    make object! copy/deep spec

<Back | Index | Next>

Copyright 2004 REBOL Technologies