| home | contents | previous | next page | send comment | send link | add bookmark |

Programmer's Guide to the Zeno Interpreter

Appendix A.
Elements of the Zeno programming language

A summary of the elements of the language are shown in this appendix.

conventions

  • An italicized item is an elements of code determined by the programmer.
  • A bracketed [item] is optional.
  • Items in braces {item} are optional and may be repeated.

elements

A Zeno program is made up of:

    declarations
    subprograms 

A subprogram is one of:

  1. The main program:
        program
            declarations and statements 
        end program
    
  2. A subprogram that returns a value on the stack:
        function name( parameter{, parameter} ) : type specification
            declarations and statements
        end function
    

    or, if there are no parameters:

        function name : type specification
            declarations and statements
        end function
    
  3. A subprogram that operates on data without returning a value on the stack.
        procedure name( parameter{, parameter} ) 
            declarations and statements
        end procedure
    

    or, if there are no parameters:

        procedure name
            declarations and statements
        end procedure
    

A formal parameter is:

    [var] name{, name} : type specification

| home | contents | previous | next page | send comment | send link | add bookmark |