Skip to main content

Return Statement

A RETURN statement immediately exits the scope of a call expression (Function, Function Block, Method, or Property).

FUNCTION F_EarlyReturn : INT

F_EarlyReturn := 10;

// End the function early
RETURN;

F_EarlyReturn := 20;
END_FUNCTION

print(F_EarlyReturn());