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

Expressions and Functions

FUNCTIONS

Arithmetical Functions

ABS

ABS (x) Returns the absolute value of x (integer if x integer, real otherwise).

CEIL

CEIL (x)Returns the smallest integral value thatis not smaller than x (always integer). (e.g., CEIL(1.23) = 2; CEIL (-1.9) = -1).

INT

INT (x) Returns the integral part of x (always integer). (e.g., INT(1.23) = 1, INT(-1.23) = -2).

FRA

FRA (x) Returns the fractional part of x (integer 0 if x integer, real otherwise). (e.g., FRA(1.23) = 0.23, FRA(-1.23) = 0.77).

ROUND_INT

ROUND_INT (x) Returns the rounded integer part of x. The 'i = ROUND_INT (x)' expression is equivalent with the following script:

IF x < 0.0 THEN i = INT (x - 0.5) ELSE i = INT (x + 0.5)

SGN

SGN (x) Returns +1 integer if x positive, -1 integer if x negative, otherwise 0 integer.

SQR

SQR (x) Returns the square root of x (always real).

ArchiCAD 11 GDL Reference Guide

199