Page 142 - Standard Handbook Of Petroleum & Natural Gas Engineering
P. 142

Computer Applications   127

                      END-Completes  the executable statements in each block; followed by  a period
                    at  the  end  of  the main  program.
                      Executable Statements

                      Assignment  statements-Assign  values  by  numerical  or character  constants,
                    by  expressions (see Table  1-29 for arithmetic and set operators), or by  input  to
                    variables, array elements,  and  fields

                      PIPENUM:    =  1;
                      MAXTEMP:    =  PTEMP;
                      LETTER:     =  [ 1;   (*  the  empty  set  *)
                      NAME:       =  ‘WELL #l’;

                      Input/Output  statements-Two  boolean  functions  that  are  useful  in  input
                    processing are EOF, which  is TRUE if  the pointer  is currently at the end of  the
                    input file and FALSE otherwise, and EOLN, which  is  TRUE  if  the pointer  is  at
                    the  end of  the  current  input line and  FALSE  otherwise.



                                                Table 1-29
                                             Pascal Operators
                    Operator        Description         Operand(s) Type      Result Type
                    .-  _-     Assignment          Any,  except file           -
                    +          Addition            Integer or  real      Integer or  real
                               Set  union          Any  set  type        Same as operand
                    -          Subtraction         Integer or  real      Integer or  real
                               Set difference      Any  set  type        Same as operand
                               Multiplication      Integer or  real      Integer or  real
                               Set  intersection   Any  set  type        Same as operand
                    div        Integer division    Integer               Integer
                   I           Real division       Integer or  real      Real
                    mod        Modulus             Integer               Integer
                    not        Logical negation    Boo  I e an           Boolean
                    or         Disjunction         Boo  I e an           Boolean
                    and        Conjunction         Boo  I e an           Boolean
                    <=         Set  inclusion      Any  set type         Boolean
                               Less than  or  equal   Any  scalar type   Boolean
                    -          Equivalence         Boo  I e an           Boolean
                    -
                               Equality            Scalar,  set,  pointer   Boolean
                    <>         Exclusive or        Boo  I e an           Boolean
                               Inequality          Scalar,  set,  pointer   Boolean
                    >=         Set  inclusion      Any  set type         Boolean
                               Greater  than  or  equal   Any  scalar type   Boolean
                    <          Less than           Any  scalar type      Boolean
                    >          Greater  than       Any  scalar type      Boolean
                    in         Set  membership     Left operand scalar   Boolean
                                                   Right operand:  set
                                                     with  base type  same
                                                     as  left  operand
   137   138   139   140   141   142   143   144   145   146   147