Declare a class like a new type of variable

You cannot migrate code like a translation of a spoken language. You need to know the target language and framework thoroughly for such a task (be it Xojo or any other language). So you first need to invest time in learning Xojo.

So if YOU know please tell me where I can find that theory.
Thank you

Ok.
A constructor with paramarray means that every parameter will be in a array (so an undetermined sequence of x and y)
Since you could have (and from your description I understood so) also an array of coordinate you need 2 constructor.
Since paramarray parameter is internally an array we pass this array to the second form of the constructor.
So you need both.

Public Sub Constructor(paramarray points() as integer) //Constructor from an undetermined sequence of x and y coordinates
  self.constructor(points)  //this calls the other form
End Sub
Public Sub Constructor(points() as integer) //Constructor from an array of x and y coordinates
  for i as integer=0 to points.Ubound Step 2
    if (i+1)<=points.Ubound then
      pts.Append new coords(points(i), points(i+1))  //coords is your class since you can't use Realbasic.Point or Xojo.Core.Point
    end if
  next
End Sub

Hello Antonio,

Thank you very much for your help, I have continued my program and found my mistake.
I am really embarrassed but the point which blocked me since the beginning is that it is necessary to declare a new variable.
For example I put a new Point into a list so before append the point to the list I have to declare Point As New TPoint.
And then I can say List.Append Point. I don’t want to add something else to our specialist of variants but …
I have also created a class like you suggested and now everything is working well.

Grazie mille Antonio and see you soon.