TWO Questions:
1. While working in PBCC3.0, I had trouble converting this Old-DOS statement:
CONST FALSE = 0, TRUE = NOT FALSE
To this PBCC statement:
%FALSE = 0
%TRUE = NOT %FALSE
Eventually, I created this MACRO:
MACRO FALSE
FALSE = 0
END MACRO
MACRO TRUE
TRUE <> 0
END MACRO
And the compiler stopped complaining.
GLOBALS would have gotten me around the issue, but I would like understand why the compiler believed
%FALSE = 0
was a syntax error?
DEFINT A-Z is the default type declaration in both the DOS and PBCC versions.
In addition, I didn't load the "WIN32API.INC" file for two reasons:
My first reason was because in some instances a TRUE-RESULT is returned as " -1 " (Old Crescent Tools approach) and would not test out correctly with the TRUE declaration in the "WIN32API.INC" file.
Second, I didn't see any of the equates listed as being relative to the DOS code I'm converting.
2. Can "WIN32API.INC" be left out for the reasons I state?
Thanks,
------------------
Roger...
(Mail to rdrines at SpamCop dot Net)
[This message has been edited by Roger Rines (edited February 25, 2003).]
1. While working in PBCC3.0, I had trouble converting this Old-DOS statement:
CONST FALSE = 0, TRUE = NOT FALSE
To this PBCC statement:
%FALSE = 0
%TRUE = NOT %FALSE
Eventually, I created this MACRO:
MACRO FALSE
FALSE = 0
END MACRO
MACRO TRUE
TRUE <> 0
END MACRO
And the compiler stopped complaining.
GLOBALS would have gotten me around the issue, but I would like understand why the compiler believed
%FALSE = 0
was a syntax error?
DEFINT A-Z is the default type declaration in both the DOS and PBCC versions.
In addition, I didn't load the "WIN32API.INC" file for two reasons:
My first reason was because in some instances a TRUE-RESULT is returned as " -1 " (Old Crescent Tools approach) and would not test out correctly with the TRUE declaration in the "WIN32API.INC" file.
Second, I didn't see any of the equates listed as being relative to the DOS code I'm converting.
2. Can "WIN32API.INC" be left out for the reasons I state?
Thanks,
------------------
Roger...
(Mail to rdrines at SpamCop dot Net)
[This message has been edited by Roger Rines (edited February 25, 2003).]
Comment