This article provides an overview of data in the programming language Microsoft Small Basic.


What is Data

Data is information, e.g. numbers, text, images, and sounds, in a form that is suitable for storage in or processing by a computer.

Data Format

The format of data that can be handled by Small Basic differs depending on whether it is external or internal to the computer.

External Data

External data is classified according to the input / output device as shown in the following table.

device object input/output data
keyboard GraphicsWindow, Controls, TextWindow input text
mouse Mouse, GraphicsWindow input coordinate
clock Clock input date, time
file File, Network, ImageList, Flickr i/o text, image, sound
timer Timer i/o time [ms]
clipboard Controls i/o text
display GraphicsWindow, Shapes, TextWindow output text, image, shapes
sound Sound output sound

Internal Data

Internal data is stored in memory. It is stored in a variable in the program. In a normal programming language, variables have a data type, and a variable cannot contain different types of data.  For example, putting a real number or a character string in an integer variable will result in an error.  However, there is no concept of data type in Small Basic, so numbers and strings can be stored in the same variable.

Small Basic supports two types of data structures, an array and a stack.

Program and Data

Small Basic programs are saved as files with the extension .sb or .smallbasic.  This is loaded into memory at runtime and executed. In other words, the program itself is also data. The method of handling the program itself as data is called the stored program method.

Generally, a program inputs data, processes it, and outputs it again as data.

Data stored in the program itself is called a literal.

Conclusion

This article provided an overview of the data. Please refer to each link below for details.


See Also

Other Languages