May 2018
Beginner
252 pages
6h 19m
English
The first way to create an object is to use make on the base object! datatype. Let's create a square1 object with a length value and a display function, as follows:
square1: make object! [ length: 10 display: does [ print ["Length of square1 is" length] ]] ;== make object! [ ... ]
Secondly, instead of make object!, you can use the shorter object or context.
To check whether a word refers to an object, use object?:
object? square1 ;== trueser: [2 7 42 108]object? ser ;== false