A not-so-subtle distinction between Pan6 behavior and PanX is how PanX treats the active database.
The following code in Pan6
FARCALL "Various Macros", «myOpenFile», p1 message info("databasename")
will access the database “Various Macros” (which is already open), and run the myOpenFile macro. That macro opens the file p1. When the «myOpenFile» procedure ends and the original macro resumes (after the FARCALL command), the active database is the one newly opened. That is confirmed by the message statement.
But when that same code runs in PanX and the line after the FARCALL resumes, the active database is not the newly opened one. Instead, it is the database of the original macro. That too is confirmed by the message statement.
The actual database which is opened by the FARCALL command is not known for sure. It might be p1, but might not be p1 depending on other conditions, such as if p1 was already open. If that is the case, a copy of p1 is opened instead, and named “TempFile”.
In my Pan6 code, I immediately set a variable for the active database name after the FARCALL command, so that I can close that file when I’m done with it. But in PanX, setting that variable does me no good. Neither p1 nor TempFile is the active database.
I think the way Pan6 works is a better arrangement, Jim. For now, I will have to rely on a global variable, which I generally dislike doing.
Did I miss something?