What it does
CreateText brings a Text object into being: it is how the rest of the program comes to have one. It takes textID (an integer) and string (a string), and returns nothing. That is the first of 2 forms. textID is the id you are giving a Text object: every later call names it by that number.
Syntax
1
CreateText(textID integer, string string)2
CreateText(string string) → integerParameters
| Name | Type | In forms |
|---|---|---|
| textID | integer | 1 |
| string | string | all |
What each form returns
| 1 | CreateText(1, "hello") | nothing |
| 2 | text = CreateText("hello") | integer |
Example · generated
Form 1, you choose the id yourself
CreateText(1, "hello")DO Sync()LOOPForm 2, the command hands back the id
text = CreateText("hello")DO Sync()LOOPCreateText is called with values of the types its signature asks for. 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.