You are here:Home>Else is a Reserved Word

Else is a Reserved Word

When using a single FREE command in my If – Then block I get the error “Else is a reserved word” even though my action logic syntax appears to be correct.

When using FREE statements in an If – Then or If – Then – Else block, subroutines are being called by the system to update statistics before the FREE command is executed.  This makes the action logic a multi-line block, requiring the use of open / close squirly brackets.

Even though the FREE command may be the only line of action logic in your If – Then block, there are actually multiple actions occurring since there are statistical update subroutines being called.  To eliminate this error simply include open / close squirly brackets in your If – Then block.

Example:

If v_Counter = 2 Then
{
Free All
}

By |Comments Off on Else is a Reserved Word

About the Author:

Scott Baird has been president of ProcessModel for more than 15 years. His focus has been to teach others how to improve processes dramatically. He has been successful in transferring these skills to over 200 companies, including ESPN, NASA, GE, Nationwide, Cendant, SSA and many more. Specialties: Group facilitation for process improvement, process design and simulation, simulation modeling, business management and training others to see opportunities. Scott loves to teach process improvement and has often been heard to say, “Of all the things I do, training others to improve processes is my favorite.” Scott is a father of four and a grandfather of eight. He is an avid woodworker, designing and creating presentation boxes. In his spare time, he volunteers in a college preparation program.