ReadPreferenceString

Family: Preference · One form

What it does

ReadPreferenceString takes key (a string) and defaultValue (a string), and answers a string.

Syntax

ReadPreferenceString(key string, defaultValue string) → string

Parameters

NameType
keystring
defaultValuestring

Every form returns

string

Example · generated

DO  Print(ReadPreferenceString("score", "value"))  Sync()LOOP

ReadPreferenceString is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

27 commands in Preference