Talk:Read a configuration file: Difference between revisions

→‎"Standard": Still not nailed…
(original parser implementations)
(→‎"Standard": Still not nailed…)
Line 34:
 
[[User:Markhobley|Markhobley]] 00:47, 21 February 2011 (UTC)
 
: In that case, where is the documentation link to the formal description of what the spec is? A standard isn't a standard unless people agree on it. That's the whole of what defines a standard, and I can assure you that people only really agree on defined versions of documents. (I used to work in standardization, so I ''know'' what's involved. It's a long long slog to do it for real.) –[[User:Dkf|Donal Fellows]] 17:14, 24 April 2011 (UTC)
 
On orginal parser implementations, comments were completely ignored. I went for option [a] set defaults before the config file is read. Boolean values were initially set to false unless toggled to true by the parser. There was no magic to uppercase / lowercase and variable names not matching the option names. I simply converted the case of the option name to upper case, and in the match code, I simply placed the matched data into the variable that I required.
Anonymous user