Re: R: [AD] Allegro 5 new config routines, alpha 1

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thursday 07 February 2002 21:48, Angelo Mottola wrote:
> The problem is that
> on textual config files all the variables can be interpreted as
> belonging to different types, so "1" could be interpreted as bool, int,
> hex or even string. Prefixing/postfixing all variable names with a type
> identifier into the file isn't pretty, but may solve the issue. We could
> also make the config loading/saving routines to automatically add a
> comment next to each variable, specifying the type; if Allegro doesn't
> find such a comment or a bad one, it'll guess, otherwise the variable
> will be stored with that type.

Wouldn't that be fairly easy, at least in principle?
There is no real difference between bools and ints, so wether `1' is 
integer or bool is IMHO not a very helpful distinction.
Something like 1234 is a normal integer, while "1234" and "blabla" are 
strings and 0x1234 is a hexadecimal number. Of course something like 
blabla and blabla1234 could just be strings as well, but then the meaning 
of 1234blabla is rather ambiguous.

Just my thoughts...

Evert

-- 
Evert Glebbeek, Physics student
Faculty of science, University of Amsterdam
e-mail: eglebbk@xxxxxxxxxx   ICQ: 48210348
www: http://www.science.uva.nl/~eglebbk/ 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/