Read from a settings file instead of hardcoded settings?
So instead of having my settings hardcoded, i want it to stream/read the settings from a local txt file.
How do i do this correctly?
How do i do this correctly?
for character in file
{
if character is alphabetic
continue reading characters whilst character is alphanumerical
push each character into value and store it in a token, when done save token
else if character is decimal
continue reading characters whilst character is numerical
push each character into value and store it in a token, when done save token
else if character is '"'
continue reading characters whilst character is numerical
push each character into value and store it in a token, when done save token
else
do operator check and save into token
}
for token in tokens
{
if token is identifier
create symbol set symbol name as value
continue reading tokens untill you find a terminator or equals assignment
}