Announcement

Collapse
No announcement yet.

UBOUND on empty array is -1, Ok to use this ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • UBOUND on empty array is -1, Ok to use this ?

    UBOUND on empty array return -1
    Is it safe to use this value to test that array is empty ?
    Is there a better/safer way ?

    $COMPILE EXE

    FUNCTION PBMAIN () EXPORT AS LONG
    DIM gsXarr() AS GLOBAL STRING

    MSGBOX STR$(UBOUND(gsXArr)) 'Return -1
    END FUNCTION

    Thanks for your help!

  • #2
    That's what the help says..

    ------------------

    Comment


    • #3
      Sorry I forgot to read the manual first, read the manual first, read the manual first

      ------------------

      Comment

      Working...
      X