Active Forums => QB64 Discussion => Topic started by: doppler on August 15, 2018, 11:38:33 am
Title: Use of a ini file to declare variables
Post by: doppler on August 15, 2018, 11:38:33 am
Is it possible to to use a INI file to declare variables. Like:
[string] a$="one" b$="two"
[constant] a=1 b=2 c=3
[float double] a,b,c
It would make my life easier, so I don't have to recompile every time i want to change a string or constant variable. I see this all the time in c++ and other high level languages. Or is QB64 too dumb, <-- not my opinion.
Title: Re: Use of a ini file to declare variables
Post by: SMcNeill on August 15, 2018, 11:59:01 am
Feel free to use my config file library: http://qb64.freeforums.net/thread/51/steves-config-file-system
Title: Re: Use of a ini file to declare variables
Post by: FellippeHeitor on August 15, 2018, 12:12:58 pm
Last I remember, Steve's couldn't handle identical key names across sections, so I offer mine as well.
Project page: https://github.com/FellippeHeitor/INI-Manager (https://github.com/FellippeHeitor/INI-Manager) Direct download: https://github.com/FellippeHeitor/INI-Manager/archive/master.zip (https://github.com/FellippeHeitor/INI-Manager/archive/master.zip)
This way, in your program, you'll be able to read from the sample file above like this: