3 declarations, 1 type declarations, Type declarations – Rice Lake iRite IDE User Manual

Page 19

Advertising
background image

920i

Programming Reference - Language Syntax

15

To be the best by every measure

-- Start functions and procedures definitions here.

function MakeVersionString : string;

sTemp : string;

begin

if g_iBuild > 9 then

sTemp := ("Ver " + g_csVersion + "." + IntegerToString(g_iBuild, 2));

else

sTemp := ("Ver " + g_csVersion + ".0" + IntegerToString(g_iBuild, 1));

end if;

return sTemp;

end;

procedure DisplayVersion;

begin

DisplayStatus(g_csProgName + " " + MakeVersionString);

end;

-- Begin event handler definitions here.

handler User1KeyPressed;

begin

DisplayVersion;

end;

-- This chunk of code is the system startup event handler.

begin

-- Initialize all global variables here.

-- Increment the build number every time you make a change to a new version.

g_iBuild := 3;

-- Display the version number to the display.

DisplayVersion;

end Template;

3.3

Declarations

3.3.1

Type Declarations

Type declarations provide the mechanism for specifying the details of enumeration and aggregate types. The
identifier representing the type name must be unique within the scope in which the type declaration appears. All
user-defined types must be declared prior to being used.

<type-declaration>:

type IDENTIFIER is <type-definition> ';'

;

<type-definition>:

<record-type-definition>

| <array-type-definition>

| <database-type-definition>

| <enum-type-definition>

;

TYPE

IDENTIFIER

;

IS

type-definition

Figure 3-2. Type Declaration Syntax

Advertising
This manual is related to the following products: