On Sun, Apr 26, 2020 at 8:58 AM Joseph Reichman <[email protected]>
wrote:

> HI
>
>    I am looking in the XL C docs lang reference user guide programming
> guide
>
> For the length of the following data types
>
>
>
>                   Short , int long and I cannot seem to find it
>
>
>
> frustrated
>
>
>
>               I coded a program
>
> Int len;
>
> Unsigned short shortype;
>
> Int len = sizeof(shorttype);
>                    But the compiler seemed to comment the above statement
> and not generate the assembler ps (I am running metal c);
>                         Any help appreciate it
>

I don't know about about Metal C, but if you use regular C with
optimization, and don't use a variable, the compiler simly won't generate
any code to create or initialize it. Perhaps you could use a program kike:

int main() {
    unsigned short shorttype;
    int len=sizeof(shorttype);
    return len;
}

But, then again, you didn't show us the entire program.



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>


-- 
People in sleeping bags are the soft tacos of the bear world.
Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to