In saving files using formatter, can i also save an integer or any data type and use it again later? For example a high score... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

In saving files using formatter, can i also save an integer or any data type and use it again later? For example a high score...

Also if i can read the file and a highscore integer highScore... and save it on a file then read it for later use.

31st Mar 2019, 2:11 AM
Rudolph John A. Agpoon
Rudolph John A. Agpoon - avatar
1 Answer
+ 1
Absolutely! There are many built-in functions that covers most languages that converts a string to an integer or floating point number. And in most cases, when reading a file normally (not in binary mode), a string will be used to read each line. It will be up to you to a) format the file and/or b) parse the each line to make conversions work correctly What language specifically? It would help for an example.
31st Mar 2019, 4:34 AM
Zeke Williams
Zeke Williams - avatar