TPUHELP.HLB  —  INT
  INT

     Converts a string that consists of numeric characters into an integer,
     if you specify a string for the parameter.

     Converts a keyword into its TPU internal integer equivalent, if you
     specify a keyword for the parameter.

     Accepts an integer parameter without generating an error; returns the
     integer you specified.

  Syntax

     integer := INT ({string | keyword | integer})

  Parameters

     string               A quoted string, or an expression evaluating to a
                          quoted string, consisting of numeric characters.

     keyword              A keyword whose integer equivalent you want the
                          INT built-in to return.

     integer              Any integer.  INT supports this parameter solely
                          to prevent TPU from signaling an error if you
                          inadvertently specify an integer parameter.

  Comments

     This built-in returns 0 if the string is not a number.

     The functionality of converting keywords to integers maintains
     compatibility with versions of TPU that did not support keywords as
     a separate data type.

  Examples

     The following assignment statement converts the string "12345" into an
     integer value and stores it in the variable user_int.

     user_int := INT ('12345')
Close Help