Inhalt

Index

FUNC_END

FUNC_END defines the end of FUNC block.

Syntax

FUNC name ( param_1, param_2 , ... , param_n)
...
RETURN ret
FUNC_END

Parameters

name (string): name of the function

param_1 ...param_n (string): parameters of the function

ret (decimal or string): return value

Remarks

The function is called with
name(expr_1,expr_2,...expr_n)
and gives back the value specified with RETURN.

Example:

PRINT faculty ( 9 )
END

FUNC faculty ( a )
IF a = 1 THEN
b=1
ELSE
b= a * faculty ( a - 1 )
ENDIF
RETURN b
FUNC_END

Usable since script version 1.3 (Allplan 2013-1).



Allplan

(C) ALLPLAN GmbH

Privacy policy