IonicWind Software

IWBasic => General Questions => Topic started by: Andy on November 02, 2016, 06:55:21 AM

Title: Variable type POINT
Post by: Andy on November 02, 2016, 06:55:21 AM
Fasecero gave an example of this:

   POINT p
   p.x = MOUSEX()
   p.y = MOUSEY()

But what is the variable type of p? - is it a pointer? if so, I get an error when I use DELETE p.

I cannot find any mention of it in the help file, so I was wondering what type it is, and if it is a pointer, how do I delete it.

Thanks,
Andy.
Title: Re: Variable type POINT
Post by: LarryMc on November 02, 2016, 08:04:35 AM
it is a USER DEFINED type that has been predefined

TYPE foo
  DEF name as STRING
  DEF age as INT
ENDTYPE


TYPE POINT
  DEF x as INT
  DEF y as INT
ENDTYPE
Title: Re: Variable type POINT
Post by: Andy on November 02, 2016, 08:09:30 AM
Thanks Larry,

Couldn't see the wood for the trees with that one.

Andy.