[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error Loop Variable cannot be global


Hello

I try to run this code:

' Gambas module file

Public $vList As String[] = ["a", "b", "c"]
Public $vStr As String

Public Sub Main()
  
  For Each $vStr In $vList
    Debug $vStr   
  Next

End


and it gives an error:
Error Loop Variable cannot be global

Thanks


Follow-Ups:
Re: Error Loop Variable cannot be globalBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Error Loop Variable cannot be globalJussi Lahtinen <jussi.lahtinen@xxxxxxxxx>