AIPS NRAO AIPS HELP file for SUBSTR in 31DEC18



As of Tue Apr 24 8:27:01 2018


SUBSTR: Function verb to specify a portion of a STRING variable

INPUTS

          NO adverbs.  Instead, SUBSTR takes 3 arguments as
                     SUBSTR (string, fchar, lchar)
          where string is any scalar string, fchar is the number
          of the first character, and lchar is the number of the
          last character to be used.  SUBSTR may appear on the
          left hand side of an = (store) operator.

HELP SECTION

SUBSTR
Type:  Verb      (function: leaves results on the stack)
Use:   To specify a portion of a character string variable. It
       requires 3 immediate arguments as
                     SUBSTR (string, fchar, lchar)
       where string is any scalar string, fchar is the number
       of the first character, and lchar is the number of the
       last character to be used.  Examples:
          SUBSTR (OUTNAME, 7, 12) = ' ASCAL'
          OUTNAME = SUBSTR (INNAME,1,6) !! SUBSTR (IN2NAME,1,6)
       Suppose KEYS = '30/12/83'and I = 4 and J = 8, then
          SUBSTR (SUBSTR (KEYS, I, J), I, J)  is '83'.
       SUBSTR is fairly forgiving about the upper limit: it will
       lower it to the maximum allowed and it will accept 0 as
       calling for an empty string.  The lower limit is raised
       to 1 if needed, but otherwise must be reasonable.
Adverbs:   none.

EXPLAIN SECTION


AIPS