Documentation

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:

Value Types

  • 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. Not all of these types may be available on every platform, since some of them may be either platform-specific or the type of service that they provide may not be available on the target platform, for example there is no cgicall type on the Nokia Communicator (EPOC R6) since it wouldn't make sense to be trying to host a web site on a mobile phone (at least not yet).

Object Types

  • anyvalue

  • array

  • cgicall

  • date

  • datetime

  • esf1

  • esf1button

  • esf1cbabutton

  • esf1edittext

  • esf1event

  • esf1text

  • event

  • form1

  • form1button

  • form1checkbox

  • form1combo

  • form1edittext

  • form1list

  • form1option

  • form1text

  • 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

  • window1

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 opening of a database table, 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 "smpol; Language Reference".

On June 30th, 2009 Simpol Limited released the first quarterly update of SIMPOL Professional.

Read more...