Re: LDL Cholesterol calculation
- Posted by axtens_bruce 1 month ago
- 1187 views
So I thought I'd fiddle with this code and change the big if into a decision table-ish thing.
constant lig_dec_tab = { {MININT, 57, 1}, {50, 57, 2 }, {57, 62, 3 }, {62, 67, 4 }, {67, 72, 5 }, {72, 76, 6 }, {76, 80, 7 }, {80, 84, 8 }, {84, 88, 9 }, {88, 93, 10 }, {93, 97, 11 }, {97, 101, 12 }, {101, 106, 13 }, {106, 111, 14 }, {111, 116, 15 }, {116, 121, 16 }, {121, 127, 17 }, {127, 133, 18 }, {133, 139, 19 }, {139, 147, 20 }, {147, 155, 21 }, {155, 164, 22 }, {164, 174, 23 }, {174, 186, 24 }, {186, 202, 25 }, {202, 221, 26 }, {221, 248, 27 }, {248, 293, 28 }, {293, 400, 29 }, {400, MAXINT, 30 } }
and then later
for i = 1 to length(lig_dec_tab) do if tg > lig_dec_tab[1] and tg < lig_dec_tab[2] then lig = lig_dec_tab[3] exit end if end for
But when I run it I get
C:\TEMP\ldl.ex:67 <0074>:: Errors resolving the following references: 'MININT' (ldl.ex:38) has not been declared. 'MAXINT' (ldl.ex:67) has not been declared.But aren't MININT and MAXINT supposed to internal? It's what the manual says.
-Bruce