On Wednesday 05 March 2003 15:59, Beni Cherniavsky wrote:
> - You can't write a loop that will execute the same code many times.
> This too existed in Babbage's engine but algorithms were written
> expecting such an ability long before, for example Euclid's
> algorithm for finding the GCD of two numbers. How do you
> implement it in a spreadsheet?
>
> The only way to implement loops is but unrolling them - an
> optimization excercise that should never be inflicted on a
> programmer in his source code - but with the extra requirement to
> unroll them *completely* which requires you to know the total
> number of iterations beforehand (or at least an upper bound).
Not correct nowadays. I did complex using solver and table plugins in Excel
(StarOffice didn't have them then, and didn't have the possibility to
incorporate arbitrary programming languages, only starbasic). Depending on
the model, I did or did not know the number of iterations ahead of time.
Annoying was that the spreadsheet refreshed itself after every iteration,
which is extremely slow, but that can be overriden in some spreadsheets.
Arie
--
It is absurd to seek to give an account of the matter to a man
who cannot himself give an account of anything; for insofar as
he is already like this, such a man is no better than a vegetable.
-- Book IV of Aristotle's Metaphysics
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]