March 29, 2024, 05:15:03 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Variable type POINT

Started by Andy, November 02, 2016, 06:55:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

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.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

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
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Thanks Larry,

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

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.