Hi Martin,

I would see global constants as a worthwhile
addition, and while mimicing them with variables is obviously workable
right now, I don't think it's really equivalent, or as good a solution.

I must note that, while Alex's global constant concept struck a chord with me, it isn't getting much support from the XTalks List. And at some point I realized that, just as global variables must be declared in each script that uses them, so it would be for global constants.



Rob's file inclusion idea (if I understand it right) of in effect supplying the arguments to a global constant declaration from an included file, would seem like a potentially useful and elegant capability too.

Include file support has been around since FORTRAN at least. Generally, include files are lines of source code that are compiled inline with the source code in which they are nested; thus allowing the included logic to appear in multiple applications while maintaining just one copy of the source statements.


One common use of include files is to declare variables and record structures. This is a bigger issue in Pascal, PL/1, Modula, etc. than Revolution, since one does not have to type variables and one cannot define a record structure in Transcript. However, an include facility would allow me to declare all 260+ constants to any script via one "include" statement per script instead of the number of statements necessary to define any of the 263 constants that appear in that script...and to make a change in one source file & incorporate the change into every stack that uses it.

It occurs to me that, for what I want to accomplish, perhaps my focus should be more on "compiler directives" or symbol tables than a generalized include capability. In essence, what I want is the ability to declare symbol names & values to the compiler. If support for data structures and tool box names were included in such symbol tables, we would be one step closer to supporting direct access to system calls via Transcript.
--


Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.net/who.htm

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to