You are not logged in.
Its ctrl + pause/break : this key is above the arrow keys (at the top).
Ah - found it! I'd never used that key before and must have skimmed over it when looking for it.
It stops program execution, as you said.
Thanks!
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
Hi phrontister;
I tried that, but I got the same incorrect responses as before. Maybe I didn't code it correctly. I'll try again...
for n=10 to 0 step -1/5
print n
next n
Notice how instead of getting 0 he gets 0.20539126e-14, but at least the for next loop terminates.
Last edited by bobbym (2009-08-14 13:30:06)
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Hi Bobby,
Notice how instead of getting 0 he gets 0.20539126e-14, but at least the for next loop terminates.
Yes - I'll have to remember that for situations where that is important (or maybe I should make it a habit anyway).
Some day this quirk won't exist and we won't have to dream up workarounds...and we'll laugh at the clunky ways of the old days.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
Hi phrontister;
This problem will always exist with floating point arithmetic, you can delay it with more digits of precision, but when used incorrectly it will bite you.
Exact integer and rational arithmetic do not have this problem but it is not always possible to use them.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Why not try contraint programming here?
'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.
Offline
Can you set it up?
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
But not in M
'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.
Offline
What then?
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Minizinc?
'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.
Offline
What exactly do you mean by constraint programming?
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
It is a paradigm where programming is donw by mentioning properties of the soltuion rather than explaining how to compute the solution.
'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.
Offline
It's something like logic programming except more specialized. And it seems it's often mixed with another paradigm (functional, imperative,...). The two languages mentioned on W are Oz, which is functional, and Kaleidoscope, which is imperative.
Oz seems really interresting.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline