Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4106
Number of posts: 14016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: Const parameter Posted by Actor21 on 24 Sept 2012 at 2:37 PM
The example you posted should not compile.

If your compiler compiles this then my guess is that it simply ignores const in this context, i.e., treats it as a comment. The compiler writers are creating the illusion that their compiler supports const parameters when it actually does not. Try compiling your program with and without the const and see if the two executables differ in size, particularly the size of the data segment.


Thread Tree
TheEvan Const parameter on 22 Sept 2012 at 6:04 AM
quikcarlx Re: Const parameter on 22 Sept 2012 at 6:56 PM
TheEvan Re: Const parameter on 23 Sept 2012 at 6:15 AM
quikcarlx Re: Const parameter on 23 Sept 2012 at 6:01 PM
TheEvan Re: Const parameter on 24 Sept 2012 at 2:41 AM
Actor21 Re: Const parameter on 24 Sept 2012 at 2:37 PM
TheEvan Re: Const parameter on 25 Sept 2012 at 2:40 AM
Actor21 Re: Const parameter on 26 Sept 2012 at 3:09 PM
TheEvan Re: Const parameter on 23 Sept 2012 at 6:17 AM
TheEvan Re: Const parameter on 23 Sept 2012 at 6:19 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.