Data

Holds a list of values for Read to take, in order

Keywords

Parameters & Returns

Parameters

This function takes no parameters.

Returns

Void

Quick Summary

Holds a list of values for Read to take, in order

Technical Exegesis...

Holds numbers and strings in the program for Read to take. Syntax is Data value, value, ... with any number of values on a line; a long line can carry on with _. Values can be numbers (with a sign), $hex, %binary, True/False and strings (with ~ escapes). They are values, not expressions: Data 1+2 is a build error.

Data lines are never run. All the Data in the program is one list, in the order it's written; an Include's Data goes where its Include line is. Data can go anywhere, inside or outside Functions.

Example

Example.bam
.level1
Data "The Meadow", 8, 4
.level2
Data "The Cave", 10, 5

Function Main()
    Restore level2
    Local name:String, w:Int, h:Int
    Read name, w, h
    Print name & " " & w & "x" & h      ; The Cave 10x5
    Return 0
EndFunction