Author Topic: what does this do? return ?z  (Read 2350 times)

0 Members and 1 Guest are viewing this topic.

kryton9

  • Guest
what does this do? return ?z
« 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]

Charles Pegge

  • Guest
Re: what does this do? return ?z
« Reply #1 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



kryton9

  • Guest
Re: what does this do? return ?z
« Reply #2 on: July 03, 2011, 01:26:30 PM »
Thanks, another one of those... I would never know what it was things.