SaveXml

Family: XML · 2 forms

What it does

SaveXml writes a value: it saves rather than reads. It takes xml (an integer) and filename (a string), and answers an integer. That is the first of 2 forms.

Syntax

1
SaveXml(xml integer, filename string) → integer
2
SaveXml(xml integer, filename string, options integer) → integer

Parameters

NameTypeIn forms
xmlintegerall
filenamestringall
optionsinteger2

Every form returns

integer

Example · generated

Form 1, the short one

DO  Print(SaveXml(1, "assets/data.xml"))  Sync()LOOP

Form 2, with every argument

DO  Print(SaveXml(1, "assets/data.xml", 1))  Sync()LOOP

SaveXml 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.

34 commands in XML