Language Constructs
PeopleCode language constructs include:
-
Branching structures: If and Evaluate.
-
Loops and conditional loops: For, Repeat, and While.
-
Break, Continue, and Exit statements loop control and terminating programs.
-
The Return statement for returning from functions.
-
Variable and function declaration statements: Global, Local, and Component for variables, and Declare Function for functions.
-
The Function statement for defining functions.
-
Class definition statements.
-
Try, Catch, and Throw statements for error handling.
Functions as Subroutines
PeopleCode, like C, does not have subroutines as we generally refer to them. PeopleCode subroutines are the subset of PeopleCode functions only that are defined to return no value or to return a value optionally. Calling a subroutine is the same as calling a function with no return value:
function_name([param_list]);