You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
>Well now that I know a variable array can be used in a type
A [user-defined] TYPE (upper case, intentional) is simply a source-code level tool provided by the compiler. You can make anything into a "TYPE" of some kind.
Heck, you can make a long integer into a type:
Code:
TYPE MyLong
LOWORD AS WORD
HIWORD AS INTEGER
END TYPE
You could use this if you had, say, some kind of phobia about using LO(WORD, longVar&) or HI(INTEGER, longVar&)
Well now that I know a variable array can be used in a type (Although Unsupported) I have yet another thing to test for in a different project I have been working on.
Just in the case it is used (Again Although NOT supported, and IMO not to be used until it is supported) it is a check I should perform.
The EMRPOLYLINE16, EMRPOLYBEZIER16, EMRPOLYGON16, EMRPOLYBEZIERTO16, and EMRPOLYLINETO16 structures contain members for the Polyline, PolyBezier, Polygon, PolyBezierTo, and PolylineTo enhanced metafile records.
I could not find POINT documented, so I started searching the Win32Api.inc (Thinking that I could SWEAR that I had seen it documented before, but maybe I was thinking of POINTAPI???)
Anyways while searching I found many references that I also can not find documented such as
Code:
aptl(0 TO 0) AS POINTL ' array size may vary (fake type)
A variable array size within a TYPE??? huh
I found it in
Code:
TYPE EMRPOLYBEZIER16
pEmr AS emr
rclBounds AS RECTL ' Inclusive-inclusive bounds in device units
cpts AS DWORD
aptl(0 TO 0) AS POINTL ' array size may vary (fake type)
END TYPE
and many other "Fake Types"
Still can not find POINT but still looking as I KNOOOOWWWwwww I saw it somewhere????
FWIW when I run into this problem, my solution is to change the spelling of the word. changing Point to Pointe will, probably, solve the problem. How practical this suggestion depends on how many applications and how often Point is used.
I agree that you should report this to PB support. Hopefully, the documentation can be updated in time for the release of 9.02.
A lot of my applications hold a variable called 'Point'.
For some reason PB9 seems to object to that, although Point isn't mentioned as a reserved word...
Did I miss something? (I get: "Duplicate name definition: POINT")
Code:
#Compile Exe
#Dim All
Function PBMain()
Local Point As Long
End Function
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: