TIP: Click on subject to list as thread! ANSI
echo: pascal
to: KIM FORWOOD
from: JASEN BETTS
date: 1998-04-19 14:44:00
subject: MEMORIES OF CONSTANTS

KF> I don't go quite that far, except in my keyboard unit where all the
KF> scancode constants are declared in their own separate blocks so only   
KF> those used are linked in rather than all 300+ of them. Most things I   
KF> group together are where they operate on the same data or are related  
KF> in some other way.                                                     
Why not just use untyped constants, they take no memory as they are treated
as macros by the compiler instead of being treated as "pre-initialsed
variables" as typed constants are.
eg: these programs are identical when compiled, constants in units behave
similarly.
const x=3;y=3;begin;write(x,y);end.
const x=3;begin;write(x,x);end.
begin;write(3,3);end.
bye.
                        
--- EzyQwk V1.20 01fa018d
---------------
* Origin: CSS Brisbane, Qld, Australia. (61-7-3367-3890) (3:640/350)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.