[A89] Re: Determine Variable Type


[Prev][Next][Index][Thread]

[A89] Re: Determine Variable Type




Hi!

> Okay, thanks! So this is what I got:
> 
> // start cut 'n paste
> 
> HANDLE handle;
> short eTag = 0;
> short *eTagPtr = &eTag;

What is usage of eTag and eTagPtr ???

> ESI expressionTagPtr;
> 
> .
> .
> .
> 	
> handle = HS_popEStack ();
> 
> expressionTagPtr = HToESI(handle);   
> 
> // end code cut and paste
> 
> ExpressionTagPtr should now point to the tag that
> tells what the variable is. TEXT_TAG, ASM_TAG, . . .
> right? Now how do I determine what the tag actually
> reads? I tried to use estack_to_short but that didn't
> work.

Just use

byte = peek (expressionTagPtr);

or, more "standard":

byte = *(unsigned char*)expressionTagPtr;

I hope that this helps.

Zeljko



Follow-Ups: