GoCode IO and Persistence - Owen2k6/GoOS GitHub Wiki

Persistence (save/load) & App Registration

GoCode persists variables per registered programme under:

0:\content\prf\<ProgramName>\<varName>.txt

Each file contains two lines:

  1. The value
  2. A type marker type=string or type=int

regprog=ProgramName (required before save/load)

Registers the programme name and ensures the directory exists. Must be called once before any save= or load=.

regprog=NotePad

save=varName

Saves either a string or integer variable with the given name.

string note = Hello
save=note

load=varName

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.

⚠️ **GitHub.com Fallback** ⚠️