Re: [Flashforth-devel] Trying to make forth word SYNONYM
Brought to you by:
oh2aun
|
From: Tristan W. <ho...@tj...> - 2023-05-01 05:50:07
|
Thanks to a huge amount of help from Mikael the code for SYNONYM is below
Best wishes,
Tristan
_synonym_
marker _synonym_
decimal
: synonym ( "new-name" "old-name" -- )
flash create immediate ' , ram
does> @ state 0= over c>n immed? or
if execute else cf, then
;
\ examples
synonym plus +
synonym sum plus
: other1 + ;
: other2 plus ;
: other3 sum ;
10 1 plus -11 sum
10 1 other2 -11 other3
: other4 10 1 plus -10 sum -1 sum ;
: other5 10 1 + -10 + -1 + ;
other4
other5
see +
see other1
see other2
see other3
see other4
see other5
\ synonym is the STANDARD word but alias is easier to type
\ synonym alias synonym
|