The African Chief wrote:
Actually, that's almost exactly what my mods do. If IO checking is enabled ( {$I+} ), a proceedure taking no parameters is called that would check the InOutRes state (though I used a different name) and if it's set dumps a dirty message and aborts the program.
For compatibility with BP, you would need to call the variable "InOutRes", and it should be exported, so that programmers can set it manually if they want (this feature of BP might be considered to be a bug by some, but I have found great use for it ...).
I've made use of it, too. Since there's no proper way to raise an I/O error, setting InOutRes seems to next best thing to do.
Therefore, we'll call it InOutRes in GPC as well. Exporting it will be no problem. One little question is its type: should it be Integer as in BP, or Integer(16) (which the BP Integer is in GPC)? I'd prefer Integer as that's more natural and easier to handle in the RTS functions written in C. I hope there aren't BP programs that rely on its exact size (e.g. by passing it VAR to a procedure expecting a 16 bit Integer).
Bill Currie wrote:
Good point. If I leave the check as a function call, there's no problem, but if I go to inline code I will use InOutRes.
And as long as it's a separate RTS function, I will use InOutRes, too... :-)
Frank Heckenbach wrote:
The African Chief wrote:
Actually, that's almost exactly what my mods do. If IO checking is enabled ( {$I+} ), a proceedure taking no parameters is called that would check the InOutRes state (though I used a different name) and if it's set dumps a dirty message and aborts the program.
For compatibility with BP, you would need to call the variable "InOutRes", and it should be exported, so that programmers can set it manually if they want (this feature of BP might be considered to be a bug by some, but I have found great use for it ...).
I've made use of it, too. Since there's no proper way to raise an I/O error, setting InOutRes seems to next best thing to do.
Therefore, we'll call it InOutRes in GPC as well. Exporting it will be no problem. One little question is its type: should it be Integer as in BP, or Integer(16) (which the BP Integer is in GPC)?
There is no reason why it should not just be "Integer". I can't see why its number of bits should make any difference.
Best regards, The Chief -------- Dr. Abimbola A. Olowofoyeku (The African Chief) Email: laa12@keele.ac.uk Author of: Chief's Installer Pro 4.01 for Win16 and Win32: Winner of PC PLUS Magazine Gold Award (April 1995 U.K. edition) http://ourworld.compuserve.com/homepages/African_Chief/
ftp://ftp.demon.co.uk/pub/ibmpc/win3/apps/chief/pro/chief401.zip
On 30 Oct 97 at 21:41, Frank Heckenbach wrote:
Bill Currie wrote:
Good point. If I leave the check as a function call, there's no problem, but if I go to inline code I will use InOutRes.
And as long as it's a separate RTS function, I will use InOutRes, too... :-)
Actually, I meant there's no problem changing the name. That's the advantage of a function call: the RTS implementation gets hidden properly.
Bill -- Leave others their otherness.