IDE - just a thought on Next and Out of Subscript
#4
Quote:I got error code 9 a general error code?

This is the standard error message when the index range is exceeded: 9 -> Subscript out of range
Code: (Select All)
Option _Explicit
Option Base 1

Dim As Integer feld(15), i, fehlerNummer

For i = 1 To 16
  feld(i) = i * 2
  Print feld(i)
  If fehlerNummer = 9 Then
    GoTo Fehler
  End If
Next

Fehler:
Locate CsrLin + 2, 3
Beep: Print "Feldindex wird ueberschritten!"

End

[Image: Ausserhal-des-Index2023-05-14.jpg]
Reply


Messages In This Thread
RE: IDE - just a thought on Next and Out of Subscript - by Kernelpanic - 05-14-2023, 04:51 PM



Users browsing this thread: 3 Guest(s)