This chapter describes the value types that are available in a Yewslip program.
Yewslip is a dynamically typed language. Variables do not have defined types, rather, each value has an associated type. Values of different types may be used together in expressions; operators have specific rules of handling these cases.
nil value represents an absence of value. Most operations with a
nil value yield a
nil result. The
nil result is also returned from a function that failed. When used in arithmetic expressions,
nil is equivalent to
Yewslip>print 1 - nil
Yewslip>print "text" + nil
Yewslip>print 0 / 0 /* this is undefined */