thanks

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of
Charles Mills
Sent: Sunday, April 26, 2020 3:59 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: XL C\C ++ sizeof of datatypes

+1

Or RTFKC:
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1
.cbclx01/zos_supporting_ansi_iso_standards.htm

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of retired mainframer
Sent: Sunday, April 26, 2020 12:03 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: XL C\C ++ sizeof of datatypes

Don't allow extraneous factors (such as optimization or argument promotions)
to obfuscate the information you want.  If you want the sizes of the types,
print the sizes of the types.

#include <stdio.h>
int main(void)
    {
     printf("%zd %zd %zd", sizeof(short), sizeof(int), sizeof(long));
     return 0;
     }

> -----Original Message-----
> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On 
> Behalf Of Joseph Reichman
> Sent: Sunday, April 26, 2020 6:58 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: XL C\C ++ sizeof of datatypes
> 
> 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

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to