The snip from MOUSUNIT in the examples section of PB 3.5 for DOS:
has the variable pbvScrnMode in it. I think I understand correctly
that this is the variable chosen to identify what screen mode we are
using so that Mr. Mouse will give us the right coordinates depending
on whether we are in Text mode, etc. Fine.
But where is it defined? If you are not, for example, going to use
the pure PB supplied PB35.INC declares, make a library out of this or
that, but use the pure routine in your source, you can, simply add
the mous functions to your own source, and skip the .PBL or PBU game.
Maybe.
As far as I can tell, pbvSrcnHost is some sort of an internal function
in the PB 3.5 compiler, at least it happens to be declared somewhere
else other than I can see it! If so, where? Where is there a list
of these internal functions in PB so that any normal programmer can
avoid using the variable names for something else, inadvertently, and
a description of what they do and what they provide?
I hit this quite by accident. For cosmetic reasons, I happen to prefer
hard coding the variable type with a designated type identifier at the
end, such as the % mark for integers, the ! mark for singles and so on.
Each and every variable, no matter where it is used in my source has
the trailing mark. Yes, I know Messr. Gates and M/S does not want to
do this in Visual Basic from my experience with VB which actually *DOES*
exist for us OS/2 folks, and I have. But I don't like that! Why?
Because, I have an autoconverter that I now have working for some 140 of
the 230-odd functions that PB 3.5 has I use in PB which converts PB 3.5
source to C++ code automatically for use in WATCOM v11B. I've discovered
that a cheap dirty way to handle type conversions, is to simply add the
type mark to every variable. The source converter then adds an appropriate
trailing 'identifier' in C source, such as (.int) or (.sng) that easily
shows every single variable type, even in C source. When your suite contains
close to 2500 commond distributed variables across over 800,000 lines of
source, to administrate the code with descriptive variable names is, of
course, the only way you could realisticly, or at least I can, keep
track of what they do! That *ALSO* extends to the ease in following through
the whole suite as to what *KIND* of variable this creature is.
Extending that concept to C++ has proved a great help to me in running
dual source operations between PB 3.5 for DOS and Watcom C++ for various
other operating systems in my test suite at this..
So .. to properly let my auto-translator add the variable type for this
little lonely "pbvScrnMode" variable, I added a "%" mark to it.
Blam .. PB 3.5 objected! Even though it is defined *NOWHERE* else by me in
the source, PB 3.5 for DOS insists that as "pbvScrnMode%" is a duplicate
definition for the variable. Just becasue I add the "5" mark to the tail
end of it. Chuckle..
I think that proves it must be a hidden internal function in PB 3.5 for DOS!
No?
OK, so then where is it defined? How do we get it? How many more of these
little mites are floating around in here that I just might accidently corrupt
if I use it for something else?
Where is a list of this stuff published in the documentation or made available
for the unwary? Surely that's not something that one would hide from the user,
yet nowhere in the documentation, nor the on-line search or it in the PB site,
can I find any hit for the source for this or, for example some other of these
ingenious "pbv..." creatures!
Inquiring mind wants to know!
------------------
Mike Luther
[email protected]
Code:
IF (pbvScrnMode = 7) OR (pbvScrnMode = 0) THEN Row = (Row \ 8) + 1 'if text mode, then fix coordinates Column = (Column \ 8) + 1 END IF
that this is the variable chosen to identify what screen mode we are
using so that Mr. Mouse will give us the right coordinates depending
on whether we are in Text mode, etc. Fine.
But where is it defined? If you are not, for example, going to use
the pure PB supplied PB35.INC declares, make a library out of this or
that, but use the pure routine in your source, you can, simply add
the mous functions to your own source, and skip the .PBL or PBU game.
Maybe.
As far as I can tell, pbvSrcnHost is some sort of an internal function
in the PB 3.5 compiler, at least it happens to be declared somewhere
else other than I can see it! If so, where? Where is there a list
of these internal functions in PB so that any normal programmer can
avoid using the variable names for something else, inadvertently, and
a description of what they do and what they provide?
I hit this quite by accident. For cosmetic reasons, I happen to prefer
hard coding the variable type with a designated type identifier at the
end, such as the % mark for integers, the ! mark for singles and so on.
Each and every variable, no matter where it is used in my source has
the trailing mark. Yes, I know Messr. Gates and M/S does not want to
do this in Visual Basic from my experience with VB which actually *DOES*
exist for us OS/2 folks, and I have. But I don't like that! Why?
Because, I have an autoconverter that I now have working for some 140 of
the 230-odd functions that PB 3.5 has I use in PB which converts PB 3.5
source to C++ code automatically for use in WATCOM v11B. I've discovered
that a cheap dirty way to handle type conversions, is to simply add the
type mark to every variable. The source converter then adds an appropriate
trailing 'identifier' in C source, such as (.int) or (.sng) that easily
shows every single variable type, even in C source. When your suite contains
close to 2500 commond distributed variables across over 800,000 lines of
source, to administrate the code with descriptive variable names is, of
course, the only way you could realisticly, or at least I can, keep
track of what they do! That *ALSO* extends to the ease in following through
the whole suite as to what *KIND* of variable this creature is.
Extending that concept to C++ has proved a great help to me in running
dual source operations between PB 3.5 for DOS and Watcom C++ for various
other operating systems in my test suite at this..

So .. to properly let my auto-translator add the variable type for this
little lonely "pbvScrnMode" variable, I added a "%" mark to it.
Blam .. PB 3.5 objected! Even though it is defined *NOWHERE* else by me in
the source, PB 3.5 for DOS insists that as "pbvScrnMode%" is a duplicate
definition for the variable. Just becasue I add the "5" mark to the tail
end of it. Chuckle..
I think that proves it must be a hidden internal function in PB 3.5 for DOS!

No?
OK, so then where is it defined? How do we get it? How many more of these
little mites are floating around in here that I just might accidently corrupt
if I use it for something else?
Where is a list of this stuff published in the documentation or made available
for the unwary? Surely that's not something that one would hide from the user,
yet nowhere in the documentation, nor the on-line search or it in the PB site,
can I find any hit for the source for this or, for example some other of these
ingenious "pbv..." creatures!
Inquiring mind wants to know!
------------------
Mike Luther
[email protected]
Comment