[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 149 NEW: { }, ||
--------------------------------------------------------------------------------

     The { } operator is a new operator used to define literal arrays
     and code blocks:

     1. Literal arrays:  Curly braces ({ }) used to indicate literal
        arrays.  This operator can be used anywhere an array can be
        specified.  For example:

        aArray := { 1, 2, 3, 4 }

        defines a literal array, assigning it to aArray.

     2. Code blocks:  Curly braces are also used to define a code
        block.  A code block consists of list of expressions.  In
        addition, the vertical bars (||) are used to specify an argument
        list to pass to the code block.  For example:

        bBlock := { |a, b| QOUT("The sum is: "), QQOUT(a + b) }

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson