Path: news.daimi.aau.dk!news.uni-c.dk!sunic!sunic.sunet.se!news.kth.se!nac.no!Norway.EU.net!EU.net!news.sprintlink.net!pulm1.accessone.com!usenet From: Baiss E. Magnusson Newsgroups: comp.lang.beta Subject: Constants in Beta Date: 19 Apr 1995 00:44:34 GMT Organization: PDI Lines: 26 Distribution: world Message-ID: <3n1mdi$6h3@pulm1.accessone.com> NNTP-Posting-Host: 204.118.152.121 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Nuntius 2.0_68K X-XXDate: Tue, 18 Apr 1995 01:43:31 GMT Hello, I see in the Beta demo programs a lot of lines where hard coded numeric values exist: clear : (# exit 6 #); exit 130 #); (* resource id's for edit menu *) windowId : (# exit 128 #); (* resource id of the application window *) do (100, 100) -> position; (300, 300) -> size; Now in a real world application these numbers would exist in a separate file and they would be reference by some constant name, or they would be calculated based upon some environmental setting. This is accomplished in C with <#defines> so the above would be: #define H_WINDOW 100 ... do (H_WINDOW, V_WINDOW) -> position; (WINDOW_WIDTH, WINDOW_HEIGHT) -> size; etc. What method in Beta would you use to replace all hard coded numeric values with substitute values?