https://www.hollywood-mal.com/docs/html ... rgFor.html
Code: Select all
Function p_Test()
Local months = {"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"}
revmonths = {}
;works not:
;For Local i,v In IPairs(months)
;works:
For i,v In IPairs(months)
revmonths[v] = i + 1
Next
EndFunction
1. The syntax highlighting in the vim plugin does not work for generic loops. The Author seems to have never used it. Shame on him!
2. `Local` keyword cannot be used in `For-In-Next` loops
Too make the variables i,v local in the given example, they have to be declared before the loop
Cheers,
nexus