Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
05 ArchiCAD 11 GDL Reference Guide.pdf
Скачиваний:
59
Добавлен:
11.03.2015
Размер:
3.22 Mб
Скачать

Control Statements

Example:

IF a = b THEN height = 5 ELSE height = 7

IF needdoors THEN

CALL "door_macro" PARAMETERS

ADDX a

ENDIF

IF simple THEN

HOTSPOT2 0, 0

RECT2 a, 0, 0, b

ELSE PROJECT2 3, 270, 1

IF name = "Sphere" THEN

ADDY b

SPHERE 1

ELSE

ROTX 90

TEXT 0.002, 0, name

ENDIF

GOTO

GOTO label

Unconditional jump statement. The program executes a branch to the statement denoted by the value of the label (numerical or string). Variable label expressions can slow down interpretation due to runtime jumping address determination.

Example:

GOTO K+2

GOSUB

GOSUB label

Internal subroutine call where the label is the entry point of the subroutine. Label value can be any numerical or string expression. Variable label expressions can slow down interpretation due to runtime jumping address determination.

RETURN

RETURN

Return from an internal subroutine.

ArchiCAD 11 GDL Reference Guide

213