We have used named common in subroutines called from UV Basic to hold file variables and dimensioned file variables without problems for over 5 years.
There was a quirk, if I remember right, that I had to play around with the common. I remember reducing the number of items to a named common and removing spaces. There may be something funny about the way variables are stored in memory that I had tripped up, but works fine now. My suggestion, put common variables in an include file, it makes it easier to play around with the common statement. Also try putting all the common variables on one line and see if that helps. Also maybe use a common name that is different to the subroutine names. Check the logic of initpath is working properly. If you are only using the variable to check if the file is open, consider using the FILEINFO command. (there is bug in early releases of 10.0 & 10.1 in testing Dimensioned File variables). If you are changing directory, the documentation states that you cannot open files in a remote directory and you maybe falling over this Hope this helps Regards David Jordan Founding U2UG Director I ran some tests and determined that named common works in this environment, but have experienced some strangeness since implementing it. We have around 300 UV subroutines, with named common in fewer than 25. The goal is to keep from having to open the files every time the subroutine is called. The problems seem to occur in the routines with named common. Strangeness includes not being able to find a file, and getting data from the wrong file or ID. These 25 routines are used extensively, but the failures happen very rarely and sporadically, so are difficult to monitor. I have temporarily removed the named common to see if the strangeness goes away. ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/