19.4.9. Looking up Sizes of Lists and Strings

If the length of items or number of items in a list could be variable, then these sizes can be determined by the following utility.

      CALL USER_PEEK_SIZE(CDANAM, NSIZE, LENVEC, CERACT, CRESLT, CZ )

Input arguments:

  • CHARACTER*(*) CDANAM - solver name of parameter.

  • CHARACTER*4 CERACT - error action.

    • STOP to stop on error.

    • SKIP to continue silently.

    • WARN to continue after warning.

  • CHARACTER*4 CRESLT - result code.

    • GOOD if successful.

  • CHARACTER*1(*) CZ - solver stack for CHARACTER data.

Output arguments:

  • INTEGER NSIZE - number of items in list.

  • INTEGER LENVEC - number of characters in the longest item, ignoring any leading spaces