EasyManuals Logo

Parker ACR Series Programmer's Guide

Parker ACR Series
176 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #21 background imageLoading...
Page #21 background image
Parker Hannifin
ELSEIF Condition
The IF/ELSE statement can include the ELSEIF condition. The ELSEIF
condition lets you create a series of circumstances to test. There is
no practical limit to the number of ELSEIF conditions you can
include. However, they must come before the ELSE condition.
Here is how it works. When the IF condition is true, the subsequent
statements are executed. When the IF condition is false, each ELSEIF
statement is tested in order. When an ELSEIF condition tests true, the
subsequent statements are executed. When the ELSEIF condition test
false, the statements following ELSE condition execute. After
executing the statements following an IF, ELSEIF, or ELSE, the
program moves past the ENDIF to continue program execution.
When using the ELSEIF condition, you can omit the ELSE condition.
When the IF and ELSEIF conditions test false, statement execution
after the ENDIF continues. Think of it as creating a series of IF/THEN
statements.
GOSUB
The GOSUB branches to a subroutine and returns when complete.
You can use GOSUB and RETURN anywhere in a program, but both
must be in the same program. A procedure can contain multiple
RETURN statements. However, on encountering the first RETURN
statement, the program execution branches to the statement
directly following the most recently executed GOSUB statement.
Example
The following example demonstrates a simple GOSUB routine.
GOSUB Label1
_Label1
PRINT “Inside Label1 subroutine”
RETURN
GOTO
The GOTO statement provides an unconditional branch within a
procedure. You can only use the GOTO in the procedure in which it
appears.
You can nest GOTO statements in an IF/THEN statement.
NOTE: The GOTO statement makes code difficult to read and
maintain.
Programming Basics 21

Other manuals for Parker ACR Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Parker ACR Series and is the answer not in the manual?

Parker ACR Series Specifications

General IconGeneral
BrandParker
ModelACR Series
CategoryController
LanguageEnglish

Related product manuals