Announcement

Collapse
No announcement yet.

PBWin 9 and Point

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael Mattias
    replied
    >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&)

    MCM

    Leave a comment:


  • José Roca
    replied
    The use of DIMENSIONED arrays in types IS SUPPORTED, what is not supported is the use of dynamic arrays.

    Leave a comment:


  • Cliff Nichols
    replied
    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.

    Leave a comment:


  • Michael Mattias
    replied
    >A variable array size within a TYPE??? huh

    The EMRPOLYLINE16, EMRPOLYBEZIER16, EMRPOLYGON16, EMRPOLYBEZIERTO16, and EMRPOLYLINETO16 structures contain members for the Polyline, PolyBezier, Polygon, PolyBezierTo, and PolylineTo enhanced metafile records.
    Code:
    typedef struct tagEMRPOLYLINE {
      EMR    emr; 
      RECTL  rclBounds; 
      DWORD  cpts; 
      POINTS apts[1]; 
    } EMRPOLYLINE16,     *PEMRPOLYLINE16,
      EMRPOLYBEZIER16,   *PEMRPOLYBEZIER16,
      EMRPOLYGON16,      *PEMRPOLYGON16,
      EMRPOLYBEZIERTO16, *PEMRPOLYBEZIERTO16,
      EMRPOLYLINETO16
    ...
    apts
    Array of 16-bit points, in logical units.

    Leave a comment:


  • José Roca
    replied
    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)
    The help file doesn't document the Windows API. Search in the Microsoft documentation.

    Code:
    A variable array size within a TYPE??? huh :confused2:
    Yes. PB doesn't support it, so you will need to make your own declaration with aptl dimensioned with as many elements you will need.

    Leave a comment:


  • José Roca
    replied
    POINT

    The POINT structure defines the x- and y- coordinates of a point.

    Code:
    TYPE POINT
       x AS LONG
       y AS LONG
    END TYPE
    Members

    x Specifies the x-coordinate of the point.

    y Specifies the y-coordinate of the point.

    Leave a comment:


  • Cliff Nichols
    replied
    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????

    Leave a comment:


  • Walt Thompson
    replied
    Hi Peter;

    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.

    Leave a comment:


  • Rodney Hicks
    replied
    A list of reserved words here:
    http://www.powerbasic.com/support/pb...light=reserved

    Leave a comment:


  • Michael Mattias
    replied
    > didn't find that anywhere in the helpfile...

    Send those bug reports to [email protected]

    Leave a comment:


  • Peter Lameijn
    replied
    I didn't find that anywhere in the helpfile...

    Leave a comment:


  • José Roca
    replied
    POINT is a built-in structure in the new compilers.

    Leave a comment:


  • Peter Lameijn
    started a topic PBWin 9 and Point

    PBWin 9 and Point

    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
Working...
X