REBOL Document

Mold - Function Summary


Summary:

Converts a value to a REBOL-readable string.

Usage:

mold value

Arguments:

value - The value to mold

Refinements:

/only - For a block value, give only contents, no outer [ ].

/all - Mold in serialized format

/flat - No indentation

Description:

MOLD differs from FORM in that MOLD produces a REBOL readable string. For example, a block will contain brackets [ ] and strings will be " " quoted or use braces { } (if it is long or contains special characters).

When given a block of values, spaces are inserted between each values (except after a newline). To avoid the spaces between values use INSERT to insert the block into a string. MOLD does not evaluate the values within a block. To do so use REMOLD.


    print mold 10:30
    10:30


    print mold %image.jpg
    %image.jpg


    print mold [1 2 3]
    [1 2 3]

Related:

form - Converts a value to a string.
insert - Inserts a value into a series and returns the series after the insert.
join - Concatenates values.
reduce - Evaluates an expression or block expressions and returns the result.
remold - Molds a reduced block and returns a string.


<Back | Index | Next>

Copyright 2004 REBOL Technologies