|
The important thing I think would be to prevent the value of the Const variables from being changed. I was under the impression that, while you are warned in the manual not to change Const parameters within a procedure, there was nothing that prevented you from doing this. After rereading the manual however, I am no longer certain about that. It would be nice if the compiler prevented you from changing Const parameters, if it doesn't already. As far as the optimization goes, I doubt it really matters to many of the programmers how the compiler implements the functionality, as long as it works. :) Joe Lee >>> bmorris@xxxxxxxxxx 12/30/2004 13:06:53 >>> Joe Lee wrote: > > An interesting idea occurred to me while reading this. Would it be > possible to add constant qualified data structures? These constants > would be used and defined just like a variable qualified data structure. > So you would have something like the following. > > DayOfWeek DS Qualified Const > Sunday Const(1) > Monday Const(2) > Tuesday Const(3) > Wednesday Const(4) > Thursday Const(5) > Friday Const(6) > Saturday Const(7) I like the idea of Const for variables. I think it would be fairly straightforward to do given that it's already possible to have constant variables through prototyped parameters. Optimizing it not to generate storage for the constant variables would be more complex, but not strictly necessary anyway.
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.