Propeller (inglés)

Page 90

CON – Spin Language Reference Example:

OBJ Num : "Numbers" PUB SomeRoutine Format := Num#DEC

'Set Format to Number's Decimal constant

Here an object, “Numbers,” is declared as the symbol Num. Later, a method refers to numbers’ DEC constant with Num#DEC. Num is the object reference, # indicates we need to access that object’s constants, and DEC is the constant within the object we need. This feature allows objects to define constants for use with themselves and for parent objects to access those constants freely without interfering with any symbols they created themselves.

Page 90 · Propeller Manual v1.1


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.