Liste des Groupes | Revenir à col misc |
On Mon, 3 Mar 2025 23:02:44 -0500, c186282 wrote:len=sprintf(query,"insert into day set timestamp='%s',demand='%f',frequency='%f',coal='%f',nuclear='%f',ccgt='%f',ocgt='%f',french_ict='%f', irish_ict='%f', dutch_ict='%f', ew_ict= '%f', pumped='%f',hydro='%f',wind='%f',oil='%f',other='%f', north_south='%f', scotland_england='%f', solar='%f', biomass='%f', nemo='%f',ifa2='%f', nsl='%f', intelec_ict='%f',vkl_ict=%f",
It's easy to kinda drift into that during development, you alwaysI never made it to anywhere close to 60 parameters. We did have one
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.
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.
Les messages affichés proviennent d'usenet.