Liste des Groupes | Revenir à ol misc |
On 3/4/25 1:25 AM, rbowman wrote:Unless its a library function.On Mon, 3 Mar 2025 23:02:44 -0500, c186282 wrote:Hey, they have a function and certain simplicity.
>It's easy to kinda drift into that during development, you always>
think of ONE more thing you need to pass. However stage two, you put
all that crap in a struct and pass one pointer. Each function can
extract what it needs from that struct and ignore the rest.
I never made it to anywhere close to 60 parameters. We did have one
utility that took 22 command line parameters but it was never meant to be
invoked manually and came with a csh. Even then they all were stuffed into
a struct before the real function was called.
>
Even worse, the parameters were field widths in a positional record. I
truly hate positional records but the damn things live on.
Anyway, have writ many pgms where functions might
need access to a LOT of params - 'C'/Python/Pascal -
and the best way is to create a struct/record/list/dict
from which those functions can extract what they need,
and update what they need. Just send a pointer.
NO need for 60 discrete params.
Les messages affichés proviennent d'usenet.