I believe that edpresoso is wrong and that sizeof is always an operator, never 
a function, despite the parentheses.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


________________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Charles Mills <[email protected]>
Sent: Monday, April 27, 2020 5:45 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://secure-web.cisco.com/17gpmDBkWzqWqGMhxvhYOL7Gh6Los9fw28x1TitarKIHN9PktFSwcSUXStjw8dG_ilzFTV9oIEmChXP4bSfdMZQTg6GRchPfD0-p_Ri_PfWzu-NJYlgrCKK-eBslsxUN7e_HmExhAJvllwMqOYz1PVSDLZzU8dfgd5fj8kKClVhjpZkb_eEKadi94x7T0Vuzt6PhHlIdO_sPTZTSylNnlGnVn0GOAMdgNlsUYjq4Xs3dS3ODTNRx1vs02xI1C7ZUg5jj_uKia1sbIFDHNGFHU99GCM8XwyvX4y8cIIr8nitz6Ihc8S3QhSlSvqbSeE7DI7V2hEApbjOm6y1OrDu_UlNTvbeLCILmgF8GLr4xkuCroXB_9RWufG3jf9x14b76UAXG0czxLyK6hjZDWh8dIbO1x2acDyBPo4636NjsgSftsHcqr0OrAdf9KXIiFchBFoFKYtxcFpQkZkMFfVm5pDA/https%3A%2F%2Fwww.educative.io%2Fedpresso%2Fwhat-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