Newbie question #2

Richard Gaskin ambassador at
Tue Oct 21 04:35:50 EDT 2003

Paul Malloy 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

 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge: Publish any database on any Web site
 Ambassador at
 Tel: 323-225-3717                       AIM: FourthWorldInc

More information about the Use-livecode mailing list