Re: RunTime Datatype Determination in C




Richard Tobin wrote:
In article <1164291520.554315.129740@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
manish <83.manish@xxxxxxxxx> wrote:

we have avariablr
int bps; // bps determined during run time

we want appropriate declaration depending upon bps.

I don't really see why you want to do this, but perhaps you could use
a union of the possible types, and access the appropriate member
depending on bps?

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.

Hi all,
I have a program. Please tell me what do you think about this.

int main(int x)
{
if(x==1)
{
int myval;
printf("size of integer myval: %d\n",sizeof (myval));
}
else
{
float myval;
printf("size of real myval: %d\n",sizeof (myval));
}
}

.



Relevant Pages

  • Re: RunTime Datatype Determination in C
    ... a union of the possible types, ... depending on bps? ... "Consideration shall be given to the need for as many as 32 characters ... in some alphabets" - X3.4, ...
    (comp.lang.c)
  • Re: JSH: Use ratings
    ... Richard Tobin wrote: ... people to start rating to help me pick which people to reply to. ... "Consideration shall be given to the need for as many as 32 characters ... in some alphabets" - X3.4, ...
    (sci.math)
  • Re: Stipping all alpha characters from a string
    ... hi alyx, ... insert into t select 'call me' union all ... select strn, dbo.fn_numeric'numeric' ... > I need to strip the characters down to only a number so I can evalute ...
    (microsoft.public.sqlserver.mseq)
  • Re: Judge the encode systm used by the file.
    ... richard@xxxxxxxxxxxxxxx (Richard Tobin) writes: ... For example, if any of the 8 characters F0 to F7 appears, it must be ... These "follow-on" characters come to our aid, ... nor small y with any accent. ...
    (comp.lang.c)
  • Re: Any Method to Determine Endianness at Compile Time ?
    ... Richard Tobin wrote: ...
    (comp.lang.c)