PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • WLanguage properties that can be used with the Point type
  • Assigning a Point variable
  • Assigning an array of Points
  • Comparison and serialization
  • Notes
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Point (Type of variable)
In french: Point
A Point variable is a structured type that is used to represent a position (X, Y) in 2 dimensions.
Example
MyPoint is Point
MonPoint.X = 280
MonPoint.Y = 54
Syntax

Declaring and initializing a point Hide the details

<Point name> is Point
<Point name>:
Name of the Point variable to declare.
Remarks

WLanguage properties that can be used with the Point type

The initial value of a point is set to (0,0).
The following properties can be used to handle a Point variable:
Property nameEffect
XX coordinate of the point. This coordinate corresponds to a signed 4-byte integer.
YY coordinate of the point. This coordinate corresponds to a signed 4-byte integer.

Assigning a Point variable

A Point variable can be assigned with:
  • another point.
    For example:
    MyPoint is Point
    MonPoint.X = 280
    MonPoint.Y = 54
    MyPoint1 is TO Point = MyPoint
  • an array of two values that can be converted into integer.
    For example:
    MyPoint is Point
    MyPoint = [280, 54]

Assigning an array of Points

An array of Points can be assigned with:
  • an array of values containing points.
    For example:
    TableauDePoints is an array of Points.
    PointChart = [MyPoint1, MyPoint2]
  • an array of two values that can be converted into integer.
    For example:
    TableauDePoints is an array of Points.
    ArrayOfPoints = [[1,2],[3,4]]

Comparison and serialization

  • Comparison: The comparison operators = and <> are available.
  • Serialization: The binary, XML and JSON serializations are available.
    Caution: During an XML serialization, it is not possible to use the xmlAttribute option on a class or structure member of type Point.

Notes

  • An Variable of type Point can be stored in a variant.
  • An Variable of type Point is never null:
    • The "PointVariable = NULL" condition always returns False.
    • The "PointVariable <> NULL" condition always returns True.
  • It is not possible to reference an Variable of type Point.
    The "PointVariable2 <- PointVariable1" syntax triggers an error.
  • It is not possible to force the copy of an Variable of type Point.
    The "PointVariable2 <= PointVariable1" syntax triggers an error.
  • It is possible to add and subtract two variables of type Point.
  • Variables of type Point can be passed to API s in the system.
  • Versions 26 and later
    The variables of type Point are used to define the points of the variables of type Polygon.
    New in version 26
    The variables of type Point are used to define the points of the variables of type Polygon.
    The variables of type Point are used to define the points of the variables of type Polygon.
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment