You may see the operator with parentheses more often than without but that
does not change the nature of the keyword.  Any function with the same name
as a keyword causes undefined behavior.

> -----Original Message-----
> From: IBM Mainframe Discussion List <[email protected]> On
> Behalf Of Charles Mills
> Sent: Monday, April 27, 2020 2:46 PM
> To: [email protected]
> Subject: Re: XL C\C ++ sizeof of datatypes
> 
> I think both are correct, and in my experience I have seen the function
much
> more than the operator.
> 
> https://www.educative.io/edpresso/what-is-the-sizeof-function-in-c
> 
> Charles
> 
> 
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Farley, Peter x23353
> Sent: Monday, April 27, 2020 10:31 AM
> To: [email protected]
> Subject: Re: XL C\C ++ sizeof of datatypes
> 
> Joe,
> 
> In C the "sizeof" keyword is an OPERATOR, not a function.  Instead of
> "sizeof(shorttype)" you should code "sizeof shorttype".
> 
> Peter
> 
> -----Original Message-----
> From: IBM Mainframe Discussion List <[email protected]> On
> Behalf Of
> Joseph Reichman
> Sent: Sunday, April 26, 2020 9:58 AM
> To: [email protected]
> 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
> --
> 
> This message and any attachments are intended only for the use of the
> addressee and may contain information that is privileged and confidential.
> If the reader of the message is not the intended recipient or an
authorized
> representative of the intended recipient, you are hereby notified that any
> dissemination of this communication is strictly prohibited. If you have
> received this communication in error, please notify us immediately by
e-mail
> and delete the message and any attachments from your system.
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN

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

Reply via email to