Every placeholder shown inside
arrow brackets ( <placeholder> ) should be replaced in any
actual code with the value of the item that it describes. The arrow
brackets and the word they contain should not be included in the
statement, and are shown here only for your information.
Statements shown between square
brackets ( [ ] ) are optional. The square brackets should not be
included in the statement, and are shown here only for your
information.
<Scope> = Scope Statement:
optional, PRIVATE or PUBLIC, default PUBLIC, no semicolon. See the
section titled Function
Scope.
<ReturnDataType> = Return
Data Type Statement: optional and one of INT, REAL, STRING, OR
OBJECT. No default, no semicolon. If no return type is
declared, the function cannot return any data. See the section
titled Declaring the
Return Data Type.
FUNCTION = FUNCTION Statement:
required, indicates the start of the function, keyword, no
semicolon. See the section titled Declaring Functions.
<FunctionName> = Name
statement: required, up to 32 ASCII text characters, case
insensitive, no spaces, no reserved words, no default, no
semicolon. See the section titled Naming Functions.
( <Arguments> ) = Argument
statement: surrounding brackets required even if no arguments used,
if more than one argument - each need to be separated by a comma,
can contain constants or variables of INT or REAL or STRING or
QUALITY or TIMESTAMP data type, default can be defined in
declaration, can be spread over several lines to aid readability,
no semicolon. See the section titled Function Argument
Structure.
<Statement> = Executable
Statement: required, one or more executable statements that perform
some action in CitectSCADA,
often used to manipulate data passed into the function as
arguments, semicolon required.
RETURN = RETURN Statement:
optional, used to instruct Cicode to return a value to the caller
of the function - usually a manipulated result using the arguments
passed in to the function by the caller, need to be followed by
Return Value Statement, keyword, no semicolon.
<ReturnValue> = Return
Value Statement; required if RETURN Statement used in function,
need to be either a constant or a variable, the data type need to
have been previously declared in the function Return Data Type
Statement - or does not return a value, semicolon required. See the
section titled Returning Values from
Functions.
END = END Statement: required,
indicates the end of the function, keyword, no semicolon. See the
section titled Declaring
Functions.