22.01.2015 Views

HDevelop User's Manual

HDevelop User's Manual

HDevelop User's Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

62 CHAPTER 3. LANGUAGE<br />

The control types are only used within the generic <strong>HDevelop</strong> type tuple. A tuple of length 1<br />

is interpreted as an atomic value. A tuple may consist of several numerical data items with<br />

different types. The standard representation of a tuple is a listing of its elements included into<br />

brackets (see figure 3.1).<br />

Tuple constant<br />

Value<br />

Value<br />

string<br />

integer<br />

Value<br />

[ ]<br />

real<br />

,<br />

boolean<br />

Figure 3.1: The syntax of tuple constants.<br />

℄ specifies the empty tuple. A tuple with just one element is to be considered as a special case,<br />

because it can either be specified in the tuple notation or as an atomic value: ℄ defines the<br />

same constant as . Examples for tuples are:<br />

℄<br />

½½<br />

¼º½<br />

³ÌÜس<br />

½℄<br />

½¼¼º¼¸½¼¼º¼¸¾¼¼º¼¸¾¼¼º¼℄<br />

³ÐÆѳ¸³ÜØÒ×ÓÒ³℄<br />

½½¸¼º½¸³ÀÙÓ³℄<br />

The maximum length of a tuple is limited to 1000000.<br />

3.3 Variables<br />

Names of variables are built up as usual by composing letters, digits and the underscore ³ ³.<br />

The maximum length of a variable name is limited to 256 characters. The kind of a variable<br />

(iconic or control variable) depends on its position in the parameter list in which the variable<br />

identifier is used for the first time (see also chapter 3.1). The kind of the variable is determined<br />

during the input of the operator parameters: whenever a new identifier appears, a new variable<br />

with the same identifier is created. Control and iconic variables must have different names.<br />

The value of a variable (iconic or control) is undefined until the first assignment defines it (the<br />

variable hasn’t been instantiated yet). A read access to an undefined variable leads to a runtime<br />

error (ÎÖÐ Ü ÒÓØ Ò×ØÒØØ).<br />

Instantiated variables contain tuples of values. Depending on the kind of the variable the data<br />

items are either iconic objects or control data. The length of the tuple is determined dynamically<br />

by the performed operation. A variable can get new values any number of times, but once a value<br />

has been assigned the variable will always keep beeing instantiated, unless you select the menu<br />

<strong>HDevelop</strong> / 2000-11-16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!