Cicode Programming Reference > Writing Functions > Naming Functions

Naming Functions

The required name statement follows the FUNCTION Statement and precedes the arguments statement in a CitectSCADA function. The function name is used elsewhere in CitectSCADA to activate (call) the function to have it perform the statements it contains.

Replace the <FunctionName> placeholder in the following function example with an appropriate name for your function. See the section Function Naming Standards for details.

FUNCTION
<FunctionName> ( <Arguments> )
<Statement> ;
<Statement> ;
<Statement> ;
END

You can use up to 32 ASCII text characters to name your functions. You can use any valid name except for a reserved word. The case is ignored by the CitectSCADA compiler, so you can use upper and lower case to make your names clear. For example, MixerRoomPageDisplay is easier to read than mixerroompagedisplay or MIXERROOMPAGEDISPLAY.

FUNCTION
MixerRoomPageDisplay ( <Arguments> )
<Statement> ;
<Statement> ;
<Statement> ;
END

Your functions take precedence over any other entity in CitectSCADA with the same name:

Prompt ( "Press F1 for Help" ) ;PageDisplay ( <Arguments> ) ;

Your function is invoked whenever you use the function name in CitectSCADA.