I have a text file that I am reading strings from into an array which works fine.
But when I put code inside a procedure it complains about my arrary not being recognised.
Below is just a simple example of what I mean inside a procedure:
Code: Select all
Dim A$(4)
Procedure ReadIt()
Restore StringData
For R=0 To 4
Read.s Dat$ : A$(R)=Dat$
Debug (R)
Next R
EndProcedure
ReadIt()
End
DataSection
StringData:
Data.s "Hello", "This", "is ", "my","data"
EndDataSection
Code: Select all
Dim A$(4)
Restore StringData
For R=0 To 4
Read.s Dat$ : A$(R)=Dat$
Debug A$(R)
Next R
End
DataSection
StringData:
Data.s "Hello", "This", "is ", "my","data"
EndDataSection
