Supplied Types
This section will be a continual work in progress, since the supplied types will be continually growing with time. There are two kinds of types: value types and object types. Value types are those previously listed and which are typically also known as scalar types in other languages. The following value types are included:
blob
boolean
integer
number
string
These types have been discussed in earlier sections, so they won't be covered again here.
There are a number of different classes of object types. The list below is in no way exhaustive. See the SIMPOL Language Reference Manual for a full list of the available types.
anyvalue
array
cgicall
date
datetime
event
fsfileinputstream
fsfileoutputstream
lock1
ppcstype1
ppcstype1field
ppcstype1file
ppcstype1index
ppcstype1record
ppcstype1server
ppcstype1serverfield
ppcstype1serversbme
ppcstype1servertable
ppcstype1serverudpport
rgb
sbme1
sbme1field
sbme1file
sbme1index
sbme1newfield
sbme1newfile
sbme1newindex
sbme1record
tcpsocket
tcpsocketserver
time
UTOSdirectory
UTOSdirectoryentry
wxform
wxformbutton
wxformcheckbox
wxformcombo
wxformedittext
wxformlist
wxformoption
wxformtext
wxwindow
Object types are more complex than value types and normally must be
initalized with the new()
function and the return
value must be assigned using the =@
operator. The reason
for this is efficiency. It would be terribly inefficient to completely
initialize a large complex object every time a variable is created if the
programmer only intends to use the variable to refer to an existing object.
Think of a variable representing a window. That is quite a lot of processing
and resource overhead if the window must be created as soon as the variable
is created and then the window would be thrown away as soon as the variable
is assigned to a different pre-existing window object. Also, some objects
are created only by virtue of the existence of another object, so they
cannot be created using a new()
method. Such an
object is the ppcstype1field, which can't exist without a
ppcstype1file.
The @=
operator and the =@
operator
are the equivalent of the SET command in SBL and the
Set command in Visual Basic. It is also important to be
able to test for the existence of an object. In SBL the
IS()
function combined with the NOTHING
keyword is the method used: IF IS (w, NOTHING) THEN. In
SIMPOL the same test would look like this: if w =@= .nul.
Each of the object types listed above is described in detail in the "SIMPOL
Language Reference".