VMS Help  —  RTL Routines, STR$  STR$ROUND
    The Round or Truncate a Decimal String routine rounds or
    truncates a decimal string to a specified number of significant
    digits and places the result in another decimal string.

    Format

      STR$ROUND  places ,flags ,asign ,aexp ,adigits ,csign ,cexp

                 ,cdigits

1  –  Returns

    OpenVMS usage:cond_value
    type:         longword (unsigned)
    access:       write only
    mechanism:    by value

2  –  Arguments

 places

    OpenVMS usage:longword_signed
    type:         longword (signed)
    access:       read only
    mechanism:    by reference

    Maximum number of decimal digits that STR$ROUND retains in the
    result. The places argument is the address of a signed longword
    containing the number of decimal digits.

 flags

    OpenVMS usage:mask_longword
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference

    Function flag. A value of 0 indicates that the decimal string is
    rounded; a value of 1 indicates that it is truncated. The flags
    argument is the address of an unsigned longword containing this
    function flag.

 asign

    OpenVMS usage:longword_unsigned
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference

    Sign of the decimal input string to be rounded or truncated.
    The asign argument is the address of an unsigned longword string
    containing this sign. A value of 0 is considered positive; a
    value of 1 is considered negative.

 aexp

    OpenVMS usage:longword_signed
    type:         longword (signed)
    access:       read only
    mechanism:    by reference

    Power of 10 by which adigits is multiplied to get the absolute
    value of the decimal input string. The aexp argument is the
    address of a signed longword containing this exponent.

 adigits

    OpenVMS usage:char_string
    type:         character string
    access:       read only
    mechanism:    by descriptor

    Decimal input string. This is the string of digits to which asign
    and aexp are applied. The adigits argument is the address of a
    descriptor pointing to this numeric string. The string must be an
    unsigned decimal number.

 csign

    OpenVMS usage:longword_unsigned
    type:         longword (unsigned)
    access:       write only
    mechanism:    by reference

    Sign of the result. The csign argument is the address of an
    unsigned longword containing the result's sign. A value of 0
    is considered positive; a value of 1 is considered negative.

 cexp

    OpenVMS usage:longword_signed
    type:         longword (signed)
    access:       write only
    mechanism:    by reference

    Power of 10 by which cdigits is multiplied to get the absolute
    value of the result. The cexp argument is the address of a signed
    longword containing this exponent.

 cdigits

    OpenVMS usage:char_string
    type:         character string
    access:       write only
    mechanism:    by descriptor

    Result's numeric text string. The cdigits argument is the address
    of a descriptor pointing to this numeric string. The string is an
    unsigned decimal number.
Close Help