Making the move...
rcozens at pon.net
Wed Mar 22 16:48:42 EST 2006
Sarah, Mark, et al:
> arrays are things that don't come
> naturally to me, so I probably ignore them when they would be useful.
Arrays, in the traditional sense (ie: element(1)...element(n)), were
part and parcel of my programming instruction in BASIC and my first
professional programming in FORTRAN; but I rarely use them today.
But Transcript keyed arrays make wonderful run-time tables.
SDB Client/Server uses:
local clientDbList -- array by clientId:dbId1, dbId2, etc
local dbClientList -- array by dbId:client id,writeAccessType,current
local indexList -- array by dbId:cardIndex
local lockedRecordList -- array by dbId: record id, client id
local sdbDbPathList -- array by dbId: db stack path, autoLockOn,
local sdbFieldDelimiter -- array by record type
local sdbFieldEdits -- array by record type
local sdbFieldList -- array by recordType: field name list
local sdbTranslationList -- array by clientId: 1=ASCII>ANSI, 0=None, or
-1=ANSI>ASCII + tab & ipcProtocol [tp,ae,pc,dc,sf]
clientDbList[sdbClientId] gives me a list of the ids of all dbs the
client has open
dbClientList[sdbDbId] gives me a list of all clients using the db,
including access type & current record position
indexList[sdbDbId] gives me the index to the db
lockedRecordList[sdbDbId] gives me a list of the ids of all locked
records along with the id of the user with the lock
I find this very powerful and easier to implement than alternative
CCW, Serendipity Software Company
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the Use-livecode