Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Newbie questions

From: Steven:White:ci:bloomington:mn:us at: 2-Oct-2003 12:16

>>> [kpeters--mvinc--net] 10/02/03 11:40AM >>> >>>what is the most elegant way to read a value out of an ini file?
I have wondered about this myself. If the ini file is something that exists from some other application, I have no idea, but if you are writing an application yourself and want to provide some kind of initialization parameter file, it seems like you should be able to do this: Make your "ini" file itself a REBOL script, that does nothing except define words and their values. Then, as the first step in the application, DO the "ini" script. This is based on the idea that REBOL itself is somewhat readable. For example: Your application: REBOL [] ... do %init.ini ... The contents of init.ini: (for example) REBOL [] TEST-MODE: true LOG-FILE-ID: %logfile APPLICATION-TITLE: "REBOL Consultants, Inc." ... whatever else is needed Accept this idea with the realization that I am a bit of a newcomer myself. Steven White City of Bloomington 1800 W Old Shakopee Rd Bloomington MN 55431-3096 USA 952-563-4882 (voice) 952-563-4672 (fax) [steven--white--ci--bloomington--mn--us]