Oxygen Basic

Information => Open Forum => Topic started by: kryton9 on July 03, 2011, 12:07:16 AM

Title: what does this do? return ?z
Post by: kryton9 on July 03, 2011, 12:07:16 AM
I see this in the console.inc file Charles:    return ?z

What does the ? stand for in this case...

z in that case is a zstring z[4]
Title: Re: what does this do? return ?z
Post by: Charles Pegge on July 03, 2011, 01:01:21 PM

Hi Kent,

'?' is used to get the value of any variable as though it were a system integer.

It is related to '*' and '@'. It simply makes any variable look like an integer regardless of its defined type.

So ?z would take the 1st 4 bytes of zstring z, and return them as a (32 bit) system integer.

Charles


Title: Re: what does this do? return ?z
Post by: kryton9 on July 03, 2011, 01:26:30 PM
Thanks, another one of those... I would never know what it was things.