6.9.7 String Calculations

In expressions, string fields may be compared with the relational operators, concatenated with the :: operator, and substrings may be extracted with the strleft, strright, and strmid functions. Figure 7 shows these string operations.

Form Name ex7

Data File

Beginning form no Unique records no

Repeating form no Append form no

Freeze form no Additional form no

Required form no for one record

Next form name ex7

gifs/00000001.gif

Field name string1 Field length 11

Entry Allowed yes Input required no

In Data File no Invisible no

Edit Data Type string

Field name string2 Field length 11

Entry Allowed yes Input required no

In Data File no Invisible no

Edit Data Type string

Field name string3 Field length 25

Entry Allowed no Input required no

In Data File no Invisible no

Calculation string1 :: "---" :: string2

Edit Data Type string

Field name greater Field length 3

Entry Allowed no Input required no

In Data File no Invisible no

Calculation string1 > string2

Edit Data Type boolean

Field name string4 Field length 20

Entry Allowed yes Input required no

In Data File no Invisible no

Edit Data Type string

Field name start Field length 5

Entry Allowed yes Input required no

In Data File no Invisible no

Edit Data Type integer

Field name length Field length 6

Entry Allowed yes Input required no

In Data File no Invisible no

Edit Data Type integer

Field name string5 Field length 20

Entry Allowed no Input required no

In Data File no Invisible no

Calculation strleft (string4, length)

Edit Data Type string

Field name string6 Field length 20

Entry Allowed no Input required no

In Data File no Invisible no

Calculation strmid (string4, start, length)

Edit Data Type string

Field name string7 Field length 20

Entry Allowed no Input required no

In Data File no Invisible no

Calculation strright (string4, length)

Edit Data Type string

Figure 7