Article View: comp.os.ms-windows.programmer.tools
Article #510Re: Use of const keyword - Borland container classes
From: david nugent
Date: Sat, 03 Oct 1992 19:19
Date: Sat, 03 Oct 1992 19:19
32 lines
1810 bytes
1810 bytes
bartels@sweetpea.jsc.nasa.gov (Jeff Bartels 283-4167) writes: > The Object class contains member functions which look like this: > > virtual int isSortable( const _FAR & Object ) const; > > My questions are: > > 1) What meaning does the use of the const modifier have for the > definition of the member function? I have found no references to this either > the Borland manuals, or other C++ books. I understand from MicroSoft's documentation that it means that within the routine isSortable the object is not modified. In other words, "*this" is const. > 2) Is this notation a Borland extension to the language? Has it gone before > the committee that is building the C++ standard? It is used in one generic C++ book I have read (although the author mentioned BC++, so that may have had some influence), and it is certainly a construct used by MSC7. With MSC, you can also add the __near and __far qualifiers to cast *this accordingly. .............................................................................. david nugent Public Access Usenet "Only Nixon could go to China" david@csource.oz.au +61-3-792-3507 - old Vulcan proverb 3:632/400@fidonet, 58:4100/1@intlnet, 199:4242/5@rainbownet, 33:300/6@admin PO Box 260, Endeavour Hills, Victoria, Australia, 3802.
Technical Details
Message-ID:
<0qZ9TB5w165w@csource.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!jabaru.cec.edu.au!csource!davidReferences:
<1992Oct1.215705.1396@aio.jsc.nasa.gov>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!jabaru.cec.edu.au!csource!david From: david@csource.oz.au (david nugent) Newsgroups: comp.os.ms-windows.programmer.tools Subject: Re: Use of const keyword - Borland container classes Message-ID: <0qZ9TB5w165w@csource.oz.au> Date: Sun, 04 Oct 92 05:19:32 +1000 References: <1992Oct1.215705.1396@aio.jsc.nasa.gov> Reply-To: david@csource.oz.au Organization: Unique Computing Pty Ltd, Melbourne, Australia Lines: 32