View previous topic :: View next topic |
Author |
Message |
badri5 Banned
Joined: 27 Jun 2006 Posts: 18 Topics: 16
|
Posted: Mon Jan 31, 2011 7:59 am Post subject: Evaluate |
|
|
Hi,
How it should be written using evaluate statement
When A
When B
and Test > spaces
can it be written like this
1)When A also B and test > spaces
2)When A OR B and test > spaces
which one is most appropriate
Thanks
Badri |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Mon Jan 31, 2011 10:53 am Post subject: |
|
|
you need to define your rules.
A or B is not the same as A ALSO B.
if > spaces is a primary decision point in the matrix, you have a very poor example for using an EVALUATE.
Code: |
IF test > spaces
then
evaluate true
when A
when B
end-evaluate
end-if
|
and the above resolves to A and not B when A is true, regardless of B.
define your requirements.
you should also spend some time reading the
programmers guide, especially "Coding a choice of actions" in topic 1.5.1.1
as well as the language reference for the Evaluate statement
6.2.13.2 Determining values
6.2.13.3 Comparing selection subjects and objects
6.2.13.4 Executing the EVALUATE statement _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
badri5 Banned
Joined: 27 Jun 2006 Posts: 18 Topics: 16
|
Posted: Tue Feb 01, 2011 3:26 am Post subject: |
|
|
Hi,
How it should be written using evaluate statement
When A
When B
and Test > spaces
can it be written like this
1)When A also B and test > spaces
I have deleted the 2nd condition |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Tue Feb 01, 2011 3:47 am Post subject: |
|
|
uhmmmmm, impossible to test, huh? _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Tue Feb 01, 2011 6:13 am Post subject: Difficult to say based on your text |
|
|
Do you mean that you test for Test > spaces, and if that is the case, you then test A /B or .....
Personally, I would code like this (if this is what you mean)
Code: |
evaluate true
when test <= ' '
* test is spaces or nulls - we're not interested
continue
when A = ????
perform this
when B = ????
perform that
when other
display 'Unexpected combination - serious error ?????'
end-evaluate
|
|
|
Back to top |
|
 |
|
|