[Date Prev][Date Next][Subject Prev][Subject Next][Date Index][Subject Index]

Re: hardcode.pgm anomaly--methodology



Sorry to be so long in responding: for some reason, your post only showed 
up when I resorted Eudora's table of contents for the Xy mailbox.

At any rate, one of us doesn't understand the other. I'm not sure who it is. Suppose that C1 is highest level (e.g., Chapter number) and then comes C2, and then C3.What I'm suggesting is that your XPL routine do a CI command to make this change:

CI //../

The trick is the space and hyphen following the counter number: it prevents the number from being incremented (see Customization Guide, p. 4-102).

So when it is chapter 5, section 3, point 7, you have in your original text just , which would put out "7." After the CI, your text has:
..
which should put out: 5.3.7

Voila!

--Harry

In that way, the value of
Harry Binswanger wrote:
Yes, but why would that be a problem (given your 2.1.3.1 . . . numbering system)? I probably just don't appreciate the problem.

Because it isn't enough to increment and CI a given set of counters (C3, say). You have to watch for and trap any change of C2, because that will automatically change the value of C3. And of C1, because that automatically changed the value of C2.

Here's what a properly constructed set of decimal counters would look like:
C1      1
C2      1.1
C2      1.2
C1      2
C2      2.1

You see? Every time the previous-higher-level counter changes, the first digit of the counter in question changes. Every time a new counter of that level is inserted, the digit after the period changes. And so on.

What Wally was saying yesterday about the buffers in a wp program seems relevant: you have to keep three or four counters in sync, incrementing each at different moments, to keep track of autocounters.

But a spanner in my suggested method of yesterday is that high-order ASCII/Speedos chars aren't enclosed in <<>>. Could one make a substitution table in one's hc.prn file that simply repeated them all? For example:

[264]=[264]
using the real Speedos chars?
Gosh, it seems simple to do the kind of program I'm suggesting. But what about using Carl's HARDCODE.PGM that someone mentioned having?

Carl's program doesn't make allowance for multilevel counters; it only works on the simple 1., 2., 3., type. I suppose I'm the only one who uses multilevel counters, but I love them and use them a lot.

Harry, read pp. 4-92-96, esp. the charts on 4-94 to 95. for a clearer explanation of what's involved.

--
Patricia M. Godfrey
priscamg@xxxxxxxxxx


Harry Binswanger
hb@xxxxxxxxxxxx