If Then statements/# Newbie question #2

Malte Brill malte.brill at t-online.de
Tue Oct 21 11:37:31 EDT 2003


Hi Paul and Thomas,

I hope this hasn´t been answered before. The new archives seem to resort the
replies even if I sort by date. I guess I need some time to get used to it.

I guess I know what the problem is:

>   if cell 1,1 of fld 1065 is not empty then

there is no "cell" in rev.
cells are defined by the linenumber and TABs

I guess you set up a field behaving as a table. To Get the "cells" you need
something like this:


 ---Calculate standard scores for DRS Attention subscale

set the itemdel to tab
if item 1 of line 1 of fld 1065 is not empty then
  put item 1 of line 1 of  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 item 2 of line 1 of fld 1065
  end if
  if scorePref=2 then
    put Z into item 2 of line 1 of fld 1065
  --maybe vice versa I´m not sure if you want to place it next to
  --or under your original entry
  --put Z into item 1 of line 2 of fld 1065 would be
  --the alternative
  end if
end if

Hope that helps,

Malte



More information about the Use-livecode mailing list