WHEREIS Examples


Examples:

 

SOURCE

INIT

"ABC,DEF,RST"

COMMA

INIT

","

NVAR

FORM

5

.

 

 

  

WHEREIS

COMMA IN SOURCE GIVING NVAR

  

WHEREIS

",",SOURCE

  

WHEREIS

0x2C,SOURCE

 

Examples of WHEREIS instruction. The first example will clear the ZERO flag indicating the comma was found. It will also store a value of four (4) in NVAR. The second and third examples will also clear the ZERO flag. Both examples are scanning for a comma that does exist in the SOURCE variable.

 

 

SOURCE

INIT

"ABC,DEF,RST"

COMMA

INIT

","

NVAR

FORM

5

.

 

 

  

WHEREISLAST

COMMA IN SOURCE GIVING NVAR

  

WHEREISLAST

",",SOURCE

  

WHEREISLAST

0x2C,SOURCE

 

Examples of WHEREISLAST instruction. The first example will clear the ZERO flag indicating the comma was found. It will also store a value of four (8) in NVAR. The second and third examples will also clear the ZERO flag. Both examples are scanning for a comma that does exist in the SOURCE variable.

 



PL/B Language Reference WEOF Examples WINAPI Examples