` Printed Icetips Article

Icetips Article



Par2: Combining field numbers in code
1998-08-07 -- Douglas Johnson
 
I recently downloaded some code which contained
MANY LONG statements like the following:

CASE ACCEPTED()
OF ?Field1
  MyString = ?Field1{PROP:Text}
OF ?Field2
  MyString = ?Field2{PROP:Text}
OF ?Field3
  MyString = ?Field2{PROP:Text}
OF ...
END

After sorting through all of this, it seemed it
might be helpful to offer the following tip as
a short alternative:

CASE ACCEPTED()
OF ?Field1 TO ?FieldX
  MyString = ACCEPTED(){PROP:Text}
END

In other words, functions returning a field number 
can be combined with a field specific property
statement.



Printed November 21, 2024, 12:20 pm
This article has been viewed/printed 35297 times.