Cells and tables
pmalloy at butler.org
Tue Oct 21 10:59:17 EDT 2003
Thanks for the help. Am I correct in understanding that you cannot refer to
a cell in a table field in RR, except as "item xx of line xx of field xx"?
This seems to contradict the documentation, which uses the "cell" term and
says a cell can be referred to by row,column...
And is this line failing not because of "then" but because of "cell", so the
error message is misleading?
On 10/21/03 4:46, Richard Gaskin wrote:
>> ...I want to take a number from one cell of a table, do a
>> calculation on it, and put the result into another cell of the table (or
>> spreadsheet in OMO).
>> ---Calculate standard scores for DRS Attention subscale
>> if cell 1,1 of fld 1065 is not empty then
>> put cell 1,1 of fld 1065 into RAW
>> put (35.5-RAW)/1.6 into NORM---normal control norms
>> put (NORM*10)+50 into T
>> put (1-NORM) into Z
>> global DRS1
>> put RAW into DRS1
>> if scorePref=1 then put T into cell 1,2 of fld 1065
>> if scorePref=2 then put Z into cell 1,2 of fld 1065
>> end if
>> compiling at 8:45:21 PM
>> Type if: missing 'then'
>> Object Calculate
>> Line if cell 1,1 of fld 1065 is not empty then
>> Hint 1
>> There is a "then" there obviously, so what is the problem? This worked in
>> SuperCard and OMO, by the way.
> It would work in OMO, but I don't see how it could work in SuperCard: OMO
> is the only xTalk that supported a "cell" chunk type.
> In Rev you'd do something like this:
> set the itemdel to tab
> if item 1 or line 1 of fld 1065 is not empty then
More information about the Use-livecode