Page 1 of 1

Trying to concatenate point into a string fails

Posted: Thu Mar 05, 2015 5:20 pm
by trevordevore
Why does this code not compile? I'm not seeing an error message but the widget won't display.

Code: Select all

variable tParam as String
put the x of tTipOfMenuPoint parsed as string & "," & the y of tTipOfMenuPoint parsed as string into tParam

Re: Trying to concatenate point into a string fails

Posted: Thu Mar 05, 2015 5:22 pm
by LCMark
@trevordevore: I think you want 'formatted as string' here, rather than 'parsed as string' - you are formatting a number as a string to concatenate with other strings.

Re: Trying to concatenate point into a string fails

Posted: Thu Mar 05, 2015 5:25 pm
by trevordevore
Ah, I had seen the "parsed as number" example and assumed string would be the same. Works now.

Re: Trying to concatenate point into a string fails

Posted: Thu Mar 05, 2015 5:26 pm
by LCMark
Ah - 'parsing' is the term we are using to turn a string into another type (from its string representation); formatting is for going the other way (from a type to its string representation).

Re: Trying to concatenate point into a string fails

Posted: Thu Mar 05, 2015 5:30 pm
by trevordevore
That makes sense.

Re: Trying to concatenate point into a string fails

Posted: Thu Mar 12, 2015 3:50 pm
by LCMark