Comparing Rev to other multimedia apps at NECC
Roger.E.Eller at sealedair.com
Roger.E.Eller at sealedair.com
Tue Oct 5 17:50:41 EDT 2004
> Joe,100 98 69 87
> Steve,90 80 86 72
> Nancy,80 90 85 95
>
>> Note this can be posed as a "real-world" problem:
>>
>> "The objective of this exercise is to calculate the total of a
>> specific sub-field in a file of comma-delimited text records.
>>
>> Fields are separated by commas and sub fields are separated by spaces.
>>
>> The exercise is to write a script to return the total of sub-field 1
>> of field 2 for all records in the file."
Here is another approach (needs 2 fields and 1 button).
I love how a single line of transcript can act as a simple calculator.
For Example: put 1+2
result: 3
on mouseUp
put empty into fld 2
repeat for each line thisLine in fld 1
replace space with "+" in thisLine
put "put" && (item 2 of thisLine) && "into it" into theMath
do theMath
put item 1 of thisLine & "," & it & cr after fld 2
end repeat
end mouseUp
Roger Eller <roger.e.eller at sealedair.com>
More information about the use-livecode
mailing list