Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Re: Very Simple Stack-based Languageby orkysoft (Friar) |
on Aug 18, 2002 at 17:58 UTC ( [id://191006]=note: print w/replies, xml ) | Need Help?? |
Well, the main reason for the lack of optimization is that I created it rather quickly :-). Originally, I wrote the loop without knowing what would be at the end, so that is one of the reasons the statements are as they are. Another reason, is that you might not want to use a 1000-turn limit, and indeed want to use $alive to control how long the program runs. In fact, I added the $turn comparison on later after I discovered that endless loops were quite common. The suggestion about the subroutine references is interesting, though. I'll see what I can do about that some time. Thanks for your comments! Lur: "But if this cape shrinks, consider your species extinct!"
In Section
Code Catacombs
|
|