|
From: Matthias T. <mt...@we...> - 2010-07-04 12:43:27
|
Hi, > Erich, this is a bad news. It contradicts to what Andy indicated - the > height will use THE NEWEST defined sinus. If the height would have used > the newest defined sinus I would call it a big plus for forth. What you want to achieve can be done by using deferred words. They are designed to resolve the code to be executed at runtime. Normal forth code is resolved at compile time. Erichs explaination is absolutly correct. amforth supports deferred words in a few different ways: Edefer uses EEPROM cells, Rdefer ordinary RAM cells and Udefer uses task specific User Variables. Details of how deferred words in general are at the forth200x website (http://www.forth200x.org/deferred.html > There must be I guess a simple mechanism where the newest defined sinus will > change all the references in all the other words which call the sinus. You can iterate over the whole dictionary and replace all occurances of the old sinus with your new one. But no marker/forget will undo that. > If I uplaod a new sinus word to my satellite I would be very happy that > all the words will use the new sinus. Pito see above: If you plan to replace the sinus any time later on, make it deferred. amforth has a few deferred words, the most important ones are probably turnkey and pause. Matthias |