|
Hi, Do you mean... if we have a pointer do we know to what it points ? No, we don't and there's no way we can... it can even point a datastructure, or just some binary data. Kind regards, Paul -----Original Message----- From: Sunil [mailto:sunil_ramakumar@USSWI.com] Sent: 30 May, 2002 16:48 To: rpg400-l@midrange.com Subject: Re: **Pointers Hai, In that case when we code can we be oblivious of wheather a pointer points to a string or a char or a int. Sunil ----- Original Message ----- From: "Nicolay, Paul" <paul_nicolay@merck.com> To: <rpg400-l@midrange.com> Sent: Thursday, May 30, 2002 8:01 PM Subject: RE: **Pointers Hi, I'll try to be short... a pointer by itself is nothing more than a datatype, and actually holds the address of a memory location. What is stored at that memory location is unknown by the pointer itself. In C however, when you write *char... it means a pointer to a character array (in other words a string). Since C doesn't have the concept of a string like in RPG, they usually null terminate it, meaning that x number of bytes further than the memory address a hex null is stored to indicate the end of the string. Kind regards, Paul -----Original Message----- From: Sunil [mailto:sunil_ramakumar@USSWI.com] Sent: 30 May, 2002 16:34 To: rpg400-l@midrange.com Subject: **Pointers Hai, I am a bit new to pointers and the related stuff in RPG. I am confused when some authors say *char, string* etc. As far as my understanding goes you cant define a datatype for a pointer ( infact pointer itself is a datatype, right!!). Am I right? If I am what does *char mean? Does it simply refer to the data that we know must is stored in the memory space pointed by the pointer? Regards Sunil -- _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. ---------------------------------------------------------------------------- -- Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. ============================================================================ == _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. ==============================================================================
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.