>It is always wrong to specify directly in a calling program
> which branch the...
>.
>.
>It is also wrong to pass into the called program the information
> from where it is been called.

It's only wrong if it doesn't work, is difficult to maintain or runs slow.

Both of these techniques are completely valid and have been used by
programmers to develop reusable code before the advent of object orientation
(if your language even supports OOP).

For example, I have a fairly intense screen and data entry handler that does
a lot of different things. It is inefficient for every program to call 20
different subroutines instead of calling one and telling it to "give me a
field right here and this long, in this color with these function keys
enabled that do such and so".

So this is wrong? It has saved me huge programming hours over the years.

Heck, back when I coded machine language we'd put a bunch of things we got
to work right into a module and give it different entry points. I think we
called them "device drivers" back then and it was considered a normal thing
to do.

Barry Brevik
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to