Skip to content

Execution Model

mmaness edited this page Oct 5, 2011 · 3 revisions

Constants and variable names refer to different objects during the execution of a Survenity program. Variables can have local or global scope in Survenity. Locally scoped variables only maintains their reference inside the block they were created. Globally scoped variable are accessible during all periods of program execution.

Variables do not need to be declared before their use and are not statically typed, but variables must be assigned a value before they are expected to be used in any expressions. Variable can bind to any object type and even change object type during execution.

If a variable name is not bound to a object (i.e. no assignment statement seen with the variable name to the left of the assignment operator) before the parser sees that variable name in an expression, a error should be thrown notifying the user of the variable name in question. During execution, if a variable is not bound to a value when it is used in an expression, an exception should be thrown notifying the user that a null value was found unexpectedly.

A block is a sequence of Survenity program text that is executed relative to each other. Blocks are described in more detail in the Statements and Blocks section. Blocks can represent questions, choice experiment, sequences of calculations, or a collection of questions which should be shown together (see MultipleQuestion).


Go back to Survenity Language Reference

Home | JULIE Intro | Getting Started with JULIE | JULIE References | JULIE Development | Survenity Language