LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
repeat with x = 16 to min(36,sCount)
put max(field ("R" & x),field ("B" & x)) into maxVar
put min(field ("R" & x),field ("B" & x)) into minVar
if round(maxVar/minVar,2) > mPerCent then
put round(maxVar/minVar,2) into mPerCent
---
end if
end repeat
In the line "---" I want to get the name of the field
containing the max value.
No prize for the correct answer but lots of gratitude from
a tired old brain.
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.
repeat with x = 16 to min(36,sCount)
if fld ("R" & x) > fld ("B" & x) then put "R" into tMax else put "B" into tMax
put round(fld (tMax & x)) into maxvar
put min(field ("R" & x),field ("B" & x)) into minVar
if round(maxVar/minVar,2) > mPerCent then
put round(maxVar/minVar,2) into mPerCent
---
end if
end repeat
Note: this doesn't allow for occasions where fld ("B" & x) is equal to fld ("R" & x)
I like min and max. Both remind me of people.
Minnie was my mothers middle name - well, it was 1912.
Although Minnie Driver doesn't seem to suffer from it.
Max was just funny. That was around 1950. Don't
expect that he's very funny these days.
Is age an excuse? Eighty-four and counting.
Programming powered by coffee.