JIMI beat me too this, but that's what we do. We keep a list of opened files
in a dynamic array and a dimensioned array for the file variables, both in
COMMON. A routine locates the file name in that array and returns the number
of the file, or opens the file and then returns the number. The files are
only opened once and the locate code is quick. YMMV.

ListOfFiles = file1:@am:file2
DIM ArrayOfFiles(nnn)


Locate newfilename in ListOfFiles setting FileNumber ELSE
OPEN etc, etc
END

Read/write/delete ArrayOfFiles(FileNumber)


-----Original Message-----
From: jbase@googlegroups.com [mailto:jbase@googlegroups.com] On Behalf Of
Darrin
Sent: Friday, May 27, 2011 8:50 AM
To: jBASE
Subject: Re: Dynamic array of file pointers?

Oops, it appears that jbase doesn't allow dimensioned arrays to be
passed as function parameters.

Is there another solution? Or is it best simply to pass an array of
file names and open/close those files hundreds or thousands of times a
second? It seems like I might be overlooking an obvious solution.

Common variables would be an option. But I've steered away from in
order to have a more flexible/expandable architecture. The nature of
this data is such that it will change quite frequently.

-- 
Please read the posting guidelines at:
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific
to Globus/T24

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/jBASE?hl=en

-- 
Please read the posting guidelines at: 
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to 
Globus/T24

To post, send email to jBASE@googlegroups.com
To unsubscribe, send email to jbase-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Reply via email to