Sujet : Re: The joy of FORTRAN
De : bowman (at) *nospam* montana.com (rbowman)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 05. Mar 2025, 04:16:04
Autres entêtes
Message-ID : <m2ptvjFlh9iU1@mid.individual.net>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
User-Agent : Pan/0.160 (Toresk; )
On Wed, 5 Mar 2025 01:23:57 +0000, The Natural Philosopher wrote:
Yep.
But typing in 60 variables is no slower.
And frankly no harder to debug
You haven't lived until you've done embedded SQL. First you create a
statement like
sprintf(stmt, "INSERT INTO FOO(bar, baz, bliv) VALUES (?, ?, ?)");
Then comes
EXEC SQL PREPARE do_stmt FROM :stmt;
and finally
EXEC SQL EXECUTE do_stmt using
:bar :bar_ind
:baz :baz_ind
:bliv :bliv_ind;
Of course in real life you have a lot more than three field names, and you
damn well better get the number of ? right. Then when you execute the
statement you'd better have the right number of parameters in the right
order. bar, baz, and bliv are usually globals you've filled in elsewhere
from a struct. bar_ind and so forth are optional but are filled in with an
error flag if the insert failed.
No matter how you approach it database programming is ugly.