As of Thu Apr 18 15:29:33 2024


Type:  Symbols used in the POPS interpretive language

    VERB      USE        COMMENTS

                   ----Arithmetic expressions

     +       A + B       Add the expression A to B
     -       A - B       Subtract the expression B from A
     *       A * B       Multiply the expression A with B
     /       A / B       Divide the expression A by B
     **      A ** B      Calculate A to the power B
     ( )     (A+B)*C     Grouping expressions as desired
     =       A = B       Store the value of B into A
     ,       A = 3,5,4   Separator of elements in an array
     ~       A(i) ~ 1,2,3  Store values in A(i),A(i+1)...
                         (change only as many as on RHS)
     :       TO          Equivalent to the verb TO
     ;                   Separator between AIPS statements

                   ----Logical expressions

     >       A > B       A greater than B
     <       A < B       A less than B
     =       A = B       A equal B (numeric or string)
     >=      A >= B      A equal to or greater than B
     <=      A <= B      A equal to or less than B
     <>      A <> B      A not equal to B (numeric or string)
     !       A ! B       A or B
     &       A & B       A and B
     ^       ^ A         not A

                   ----String expressions

  !!       A !! B        string = string A followed by string B
  SUBSTR   SUBSTR(A,i,j) string = chars i through j of string A
  LENGTH   LENGTH(A)     position last non-blank in A
  CHAR     CHAR(A)       convert number A to string
  VALUE    VALUE(A)      convert string A to number

                   ----Looping constructions

  (FOR-TO-BY-END)        FOR I=1 TO 7 BY 2
                         AIPS syntax>

  (WHILE-END)            WHILE 
                         AIPS syntax>

                         THEN AIPS syntax>
                         ELSE AIPS syntax>

                   ----Built-in functions

  ACOS          Arc-cosine
  ASIN          Arc-sine
  ATAN          Arctangent (one argument)
  ATAN2         Arctangent (two arguments)
  COS           Cosine (degrees)
  SIN           Sine (degrees)
  TAN           Tangent (degrees)
  EXP           Exponential
  LN            Log base e
  LOG           Log base 10
  SQRT          Square-root
  MAX           Maximum i.e. X = MAX (A, B)
  MIN           Minimum i.e. X = MIN (A, B)
  MODULUS       Root-square sum of two arguments
  MOD(A,B)      A - (A/B) * B  i.e. remainder of A/B
  CEIL(A)       Lowest integer >= A
  FLOOR(A)      Highest integer <= A

                   ----Procedure building verbs

  PROC      PV  Begin building a procedure
  PROCEDUR  PV  Begin building a procedure
  LIST      pV  List a procedure
  EDIT      PV  Edit a procedure
  ENDEDIT   PV  End editing a procedure
  ERASE     PV  Delete line(s) of a procedure
  MODIFY    PV  Modify a line in a procedure
  RETURN    V   Last statement in a procedure
  FINISH    PV  End procedure building

                   ----Variable declarations

  SCALAR    pV  Declare scalars
  ARRAY     pV  Declare arrays
  STRING    pV  Declare strings

                   ----Input/Output functions

  PRINT     V   Print the following keyword value(s)
  TYPE      V   Print the following keyword value(s)
  READ      V   Read value(s) from terminal after # prompt

                   ----Other information

  CORE      pV  Amount of core left in POPS
  COMPRESS  PV  Compress the core area, recovering lost space
                and acquiring any new vocabulary
  CLRTEMP   V   Clear the temp data array
  DEBUG     pV  Debug: turns on compiler debug information
  DUMP      V   Dump K array on terminal screen
  SCRATCH   PV  Remove procedures in POPS
  $         PV  Makes rest of input line a comment