Part of the Samples Website. 8/16/97.


«This script contains the examples used in the Frontier 3.0 main read me
«To see how it works, step thru the script using the debugger
local (myRec)
new (recordType, @myRec) «creates an empty record
msg (sizeof (myRec)) «displays 0
myRec = {'name': "Bull Mancuso", 'org ': "Mancuso Investigations", 'age ':38}
msg (sizeof (myRec)) «displays 3
local (i)
for i = 1 to sizeOf (myRec) «display each element of the record in a dialog
msg (myRec [i])
msg (nameOf (myRec [2])) «displays 'org '
local (element)
for element in myRec «a simpler way to loop over the elements of a record
msg (element)
myRec ['home'] = "Upstate, NY" «add a field named home
msg (sizeof (myRec)) «displays 4
delete (myRec [2]) «delete the second element of the record
msg (myRec) «displays {'name': "Bull Mancuso", 'age ':38}
delete (myRec ['age ']) «delete the field named 'age '
msg (myRec) «displays {'name': "Bull Mancuso"}

This page was last built on Sat, Aug 16, 1997 at 6:44:58 PM. You can download the current set of sample scripts from our FTP site. Dave