Talk:Read a configuration file: Difference between revisions

Content added Content deleted
(→‎current task: +1 on .ini file format)
(So I wrote a Ruby example...)
Line 16: Line 16:
</lang>
</lang>
: And print the resulting information? I would think that variants of .ini files are in common use, and the current task example is odd in having two comment characters, #; one of which ';' seems to be ignored and a value returned for seedsremoved; also the file has uppercase identifiers that are returned as lowercase variables? Too much magic! --[[User:Paddy3118|Paddy3118]] 03:59, 11 February 2011 (UTC)
: And print the resulting information? I would think that variants of .ini files are in common use, and the current task example is odd in having two comment characters, #; one of which ';' seems to be ignored and a value returned for seedsremoved; also the file has uppercase identifiers that are returned as lowercase variables? Too much magic! --[[User:Paddy3118|Paddy3118]] 03:59, 11 February 2011 (UTC)

: The task says to ignore comments. So I wrote a Ruby example that ignores the '; SEEDSREMOVED' line and then prints 'seedsremoved = false' because it never found a 'SEEDSREMOVED' line. I suspect that the task is a draft because the author wants to decide what else to put in the config file. --[[User:Kernigh|Kernigh]] 04:41, 11 February 2011 (UTC)