Jump to content

Recommended Posts

Posted

$Dim $s[13]

Doesn't seem to be working right.

Errors out here.

For $i = 0 to 13
$s[$i] = ""
Next

Array Variable has incorrect number of subscripts or subscript dimension range exceeded.

Posted (edited)

A 13-element array has indexes 0 to 12:

Local $D[13]
For $I = 0 to 12
    $D[$I] = ''
Next

Edit: Using UBound() will ensure that you never receive such an error:

Local $D[13]
For $I = 0 to UBound($D) - 1
    $D[$I] = ''
Next

Edit: This shouldn't be necessary anyway as all variables appear to be initialised to an empty string (for the beta at least):

Local $Array[1]
MsgBox(0x40, 'IsString()', IsString($Array[0]))
Edited by LxP

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...