Cicode Programming Reference > Cicode Function Categories > Task Functions Introduction > Halt

Halt

Stops the execution of the current Cicode task and returns to CitectSCADA. This function does not affect any other Cicode tasks that are running.

Use this function to stop execution in nested function calls. When Halt() is called, Cicode returns to CitectSCADA and does not execute any return function calls.

Syntax

Halt()

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

Assert, TaskKill

Example

INT
FUNCTION
MyFunc(INT Arg)
IF Arg<0 THEN
Prompt("Invalid Arg");
Halt();
END
... END

See Also

Task Functions