----boundary-LibPST-iamunique-1634540155_-_-
Content-type: text/plain
> The parameter list of MarkRect is _not_ self-documenting. All you know
> by looking at formal parameter mode is that it is an integer. All you
> know
> by looking at the CONST section is that there are some integer
> constants,
> but you have no way of knowing which of the integer constants, if any,
> is meant to be used as the mode value in MarkRect. You must search
> through
> the documentation for the explanation.
>
The proposal for named integers is worth consideration. I have a few
immediate concerns which may take a little time to think through.
In the meantime, the following technique satisfies the above requirements,
without any change to the language whatsoever, and without being too
'kludgey':
MODULE xyz;
TYPE
MarkMode = BYTE;
VAR
invert-, hilite-, dim25-, dim50-, dim75-: MarkMode;
...
...
PROCEDURE (f: Frame) MarkRect (l, t, r, b, s: INTEGER; mode: MarkMode; show:
BOOLEAN), NEW;
...
...
BEGIN
invert := 0;
hilite := 1;
dim25 := 2;
dim50 := 3;
dim75 := 4;
END xyz.
Notes:
1. The variables are marked read-only so that their values cannot be altered
by client modules. They are initialised at load time so efficiency is not a
major issue.
2. Declaring MarkMode as BYTE gives some type-compatibility protection
against passing arbitrary SHORT or INTEGER variables as actual parameters to
the MarkMode parameter of the procedure.
3. The separation of the declarations from the corresponding initialisation
statements might be thought to be a concern. However, as with named
integers, the client should not even be aware of the specific values
assigned to each variable.
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
blackbox-request{([at]})nowhere.xy
To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list owner at
owner-blackbox{([at]})nowhere.xy
Current posting policy:
a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.
b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.
----boundary-LibPST-iamunique-1634540155_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXG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