Mel,
You give up the ability to control all fields concurrently. If each
field were written individually, then your premise is correct.
Eric DeLong
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mel Rothman
Sent: Friday, October 17, 2008 2:38 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: More than 99 indicators needed
Bruce,
Perhaps I have misunderstood your premise, so please correct me if that
is the case.
Anyway, it seems that 3 indicators can be used to define 8 independent
conditions just as 3 binary bits can represent the values 0 through 7.
For example:
N01N02N03 (0)
N01N02 03 (1)
N01 02N03 (2)
N01 02 03 (3)
01N02N03 (4)
01N02 03 (5)
01 02N03 (6)
01 02 03 (7)
A total of 784 unique combinations can be made, for example, by using
indicators 01 and 02 in the first two positions and using, in turn,
indicators 3 through 99 in the third position.
Mel Rothman
Bruce Vining wrote:
Agreed and further I "don't think", rather I will guarantee that you
can't take an arbitrary number of independent indicators N (for
arguments sake lets say N = 99) which can represent N (99) INDEPENDENT
conditions and by Anding and/or Oring these indicators get a number of
independent conditions that is greater than N. In fact every time you
And/Or indicators you are REDUCING the number of independent conditions
that can be represented. You can, with Anding/Oring get a huge number
of combinations, but these combinations also have a huge number of
dependencies (which, going back to the original question, will cause
fields tho either print or not print when you desire the opposite
result).
Bruce
Barbara Morris <bmorris@xxxxxxxxxx> wrote:
Tom Liotta wrote:
I guess that the point I'm making is that _any_ subsequent developer
better be very clear on what is going on with this.
And as Bruce Vining pointed out, it doesn't work anyway. I don't think
there's any way to use 99 indicators to represent any _combination_ of
100 truth values. Using the double-indicator scheme would work if you
only wanted to print out one field, but if you want to print out more
than one, it's not possible to set on an arbitrary combination of the
double-indicators without accidentally setting on additional
double-indicators. Setting the double indicators 0147 and 0254 also
sets on 0154 and 0247.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.