GoCode IO and Persistence - Owen2k6/GoOS GitHub Wiki
GoCode persists variables per registered programme under:
0:\content\prf\<ProgramName>\<varName>.txt
Each file contains two lines:
- The value
- A type marker
type=string
ortype=int
Registers the programme name and ensures the directory exists. Must be called once before any save=
or load=
.
regprog=NotePad
Saves either a string or integer variable with the given name.
string note = Hello
save=note
Loads a previously saved variable back into memory, based on the on‑disk type=
marker.
load=note
println=note
If the file is missing or badly formatted, the interpreter writes diagnostics to the GoOS console.