10.1 Statements

     

The syntax of statements in PIR is much more flexible than PASM. All PASM opcodes are valid PIR code, so the basic syntax is the same. The statement delimiter is a newline \n , so each statement has to be on its own line. Any statement can start with a label. Comments are marked by a hash sign ( # ) and PIR allows POD blocks.

But unlike PASM, PIR has some higher-level constructs, including symbol operators:

 I1 = 5                       # set I1, 5 

named variables :

 count = 5 

and complex statements built from multiple keywords and symbol operators:

 if I1 <= 5 goto LABEL        # le I1, 5, LABEL 

We'll get into these in more detail as we go.



Perl 6 and Parrot Essentials
Perl 6 and Parrot Essentials, Second Edition
ISBN: 059600737X
EAN: 2147483647
Year: 2003
Pages: 116

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net