C
christopher
hi,
i'm working with data for a clinical trial. i write data edit-checks
using a program called DataFax, which has its own built-in programming
language which is loosely based on C. as such, the code example might
not have the exact same syntax as C, but the principle is the same.
i'm working on a edit check that will test a series of values, like
so:
if (a == 1 && b == 1 && c == 1 && d == 1)
then....
it occured to me that i could store a, b, c, and d in an array and use
an iterator perform the same function:
number i = 1;
group TEST a, b, c, d; /* create an array called TEST and store a,b,c,d
*/
if (condition) {
while (i <= 4) {
if (TEST == 1) {...;}
i = i + 1;}
then....
my question is: which one of these methods is the best practice? is one
inherently more efficient than the other? am i making sense?
thanks,
chris
i'm working with data for a clinical trial. i write data edit-checks
using a program called DataFax, which has its own built-in programming
language which is loosely based on C. as such, the code example might
not have the exact same syntax as C, but the principle is the same.
i'm working on a edit check that will test a series of values, like
so:
if (a == 1 && b == 1 && c == 1 && d == 1)
then....
it occured to me that i could store a, b, c, and d in an array and use
an iterator perform the same function:
number i = 1;
group TEST a, b, c, d; /* create an array called TEST and store a,b,c,d
*/
if (condition) {
while (i <= 4) {
if (TEST == 1) {...;}
i = i + 1;}
then....
my question is: which one of these methods is the best practice? is one
inherently more efficient than the other? am i making sense?
thanks,
chris