[Gambas-user] Array for File class?
Tobias Boege
taboege at ...626...
Thu Jan 31 22:41:08 CET 2013
On Thu, 31 Jan 2013, steveNewbie wrote:
> PUBLIC hFile AS NEW File[100] (Now COMPUTEs)
>
> but
>
> hFile[J] = OPEN (fileName ) FOR CREATE (Still DOES NOT COMPUTE)
>
> I get error "Class 'File' is not creatable". I tried changing the
> declaration to Stream with same error.
Why do you want to use a fixed-size array in the first place?
I would suggest something like:
--8<---------------
Dim aFiles As New File[]
Dim hFile As File
Dim J As Integer
For J = 0 To 50
hFile = Open sPath For Read
aFiles.Add(hFile)
Next
--8<---------------
Regards,
Tobi
More information about the User
mailing list