Re: I need to know about types in the stack...
Posted in 1994
In article <2nv0iq$2b7n@mtecv2.mty.itesm.mx> jvalero@mtecv2.mty.itesm.mx writes: >I am using 4gl informix linked with C and from there - C - I am trying to read data from stack. > >I was wondering how and where the type of these values (in the stack) can be found. > >Example: > CALL Mathx(50, 'A', 2.2) > Where: > 50 is short > A is char > 2.2 is double > >if later I want to read these values from the stack, how can I know the type of these values? You could start with RTFM... pages 2-64R et al. It's easiest if you know the datatypes, then just use the appropriate popping functions, e.g. popdub(&v3); popquote(v2,len); popshort(&v1); >Because, often arguments order and arguments type change. Sometimes it can be short, char, double or any combination of them. How to know the types of them? > Thanks. If you don't know the data types, you can peek into the value structure and check the v_type field, and handle accordingly. -- Alan Denney aland@informix.com {pyramid|uunet}!infmx!aland "Eventually people realized that the Information Superhighway was essentially CB radio, but with more typing." -- Dave Barry