Web Polygraph 

 Documentation
    Reference Manual
       PGL
          Overview
          Constants
          Statements
·         Operators
          Types
          Calls
       Simulation models
       Command options
       User-defined distr
       Loadable modules
       Output
    User Manual
    Workloads

 Downloads
    Copyright
    Changes
    Upgrade

 Support
    Wish List
    Sponsors
    Mailing List
    Users

 Miscellaneous
    Results
    Compliance
    Other Tools
    Search

  

Home · Search · Print · Help 


Operators

PGL supports unary and binary operators. Unary operators are `+', `-', and boolean `!'. Binary operators include `+', `-', `*', `/', and `^' (power); boolean `&&', `||', and `^^' (xor).

The binary range operator `..' is supported for integer expressions.

int[] sequence = 1 .. 10;   // an array of 10 sequential numbers

A value can be repeated or cloned using the binary clone operator `**'.

int[] clones = [ 1 ** 10 ];           // an array of 10 ones
addr[] addrs = [ '127.0.0.1' ** 10 ]; // 10 localhost addresses

Home · Search · Print · Help