ubase.getPrevRecord

Syntax ubase.getPrevRecord (fnum, key)

Params fnum is the number which identifies a uBASE database while it is open

key is the key identifying a record

Returns The key to the record before the record identified by key in the database indicated by fnum (see Notes).

Examples lastKey = ubase.getLastRecord(fnum)
key = ubase.getFirstRecord (fnum)
while key != lastKey
nextKey = ubase.getNextRecord (fnum, key)

ubase.deleteRecord (fnum, key)

key = nextKey

Errors An error is produced if uBASE is not running or if fnum does not identify an open database.

Platform Notes uBASE runs only on Mac OS and is not a supported component of Frontier 5.0,

Notes The records in a uBASE database are ordered arbitrarily. ubase.getPrevRecord is part of a method for visiting each record in a database.

If key identifies the first record in the database, this verb returns the empty string.

If key does not identify any record in the database, this verb either returns the key for some record in the database, or returns the empty string. What will be returned is not readily predictable for any given missing key (it is not random, however).

This verb is not used as often as ubase.getNextRecord.

See Also ubase.getLastRecord

ubase.getFirstRecord

ubase.getNextRecord

ubase.countRecords

Discuss