BBC BASIC for Windows
« Transfering PTR to procs »
Welcome Guest. Please Login or Register. Apr 5th, 2018, 11:04pm
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
There is no real problem with doing this; it's just adding another parameter.
There must be something wrong elsewhere in your program, since your first example - that you claim does not work - in fact is perfectly fine. A file is a global object, and if you set the file pointer in one part of your program it will remain set when accessed somewhere else. There's no way that simply calling a PROC can change it!
Go back to your original code, if you prefer it for simplicity, and debug the fault your end.
There must be something wrong elsewhere in your program, since your first example - that you claim does not work - in fact is perfectly fine. A file is a global object, and if you set the file pointer in one part of your program it will remain set when accessed somewhere else. There's no way that simply calling a PROC can change it!
Go back to your original code, if you prefer it for simplicity, and debug the fault your end.
Mmm! Ok. Not sure what went wrong to start with. Just changed it and it worked fine. I did experiment with it at the start and it didn't seem to work what ever I did. Oh, well. Thanks.