Differences

This shows you the differences between two versions of the page.

Link to this comparison view

simple_configuration_file_reader_-_using_a_generic [2012/01/02 21:48]
thomaslocke [simple_config.gpr]
simple_configuration_file_reader_-_using_a_generic [2012/04/15 07:03] (current)
thomaslocke [src/config_file_parser.adb]
Line 27: Line 27:
 **config_one.ini** **config_one.ini**
 <​code>​ <​code>​
- This is a comment. +# This is a comment. 
--- This is also a comment. ​Both and -- are valid for comments.+-- This is also a comment. 
 +; And a third comment. Lines starting with #-- and ; are treated as comments.
  
 #  This config file only changes the Foo_Boolean parameter. For the remaining #  This config file only changes the Foo_Boolean parameter. For the remaining
Line 39: Line 40:
 **config_two.ini** **config_two.ini**
 <​code>​ <​code>​
- This is a comment. +# This is a comment. 
--- This is also a comment. ​Both and -- are valid for comments.+-- This is also a comment. 
 +; And a third comment. Lines starting with #-- and ; are treated as comments.
  
 #  This config file only changes the Foo_Boolean parameter. For the remaining #  This config file only changes the Foo_Boolean parameter. For the remaining
Line 496: Line 498:
             if Line /= ""​             if Line /= ""​
               and then Line (1 .. 1) /= "#"​               and then Line (1 .. 1) /= "#"​
 +              and then Line (1 .. 1) /= ";"​
               and then Line (1 .. 2) /= "​--"​ then               and then Line (1 .. 2) /= "​--"​ then
                ​-- ​ Note that if a valid key is found in the file, and it has no                ​-- ​ Note that if a valid key is found in the file, and it has no

Navigation