Bungee Logic : Site : Expression

Page Status: Beta

Back to Sites

Contents

[edit] Purpose

An Expression site returns the result of an expression. Expressions can include the usual C-family operators including variable operands.

See the Expressions Cheat Sheet for more information.

[edit] How to Use

Consider the following code snippet:
public function foo([in] int32 x, [out] int32 y)
{
     var int32 x = 42;
     foo.y = foo.x * x;
}
The function foo has two parameters x and y, and defines the variable x.
Note the use of Path notation to differentiate between the parameter x and the variable x.
The expression foo.x * x specifies that the value of parameter x is multiplied by the value of variable x.
The result is stored in outbound variable y.

Usage of Quotation Marks:

The use of quotes is similar to Javascript in that:
To use literal double-quotes in an expression, wrap the expression in single-quotes: 'Hello "World".'
To use literal single-quotes in the expression, wrap the expression in double-quotes: "Hello 'World'."

 

    Copyright © 2005 - 2007 Bungee Labs. All rights reserved.