AKA Workaround

From: Bulgrien, Dennis <DBulgrien_at_vcsd.com>
Date: Mon, 16 Sep 2002 10:12:42 -0500

How to give a nickname to a word, that is the question.
What do you all think of the second SwiftX CODE way, from the perspective of
programming theory?

SwiftX
------

The conventional way of doing this is...
: theword ( n a -- ) ... W! ;
: nickname ( ? a -- ) theword ;

A little more efficient way...
CODE nickname ( ? a -- )
END-CODE \ Code for nickname is theword
: theword ( n a -- ) ... W! ;

chipForth
---------
AKA theword nickname

Assembly
--------
nickname:
theword: the-code...
        return from subroutine

C
---------
theword()
{ the-code...
}
#define nickname() theword()
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe swiftx" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/swiftx -- check them out!
----------------------------------------------------------------------
THIS LIST IS NOT FOR BUG REPORTS! Send bug reports to support_at_forth.com.
Received on Mon Sep 16 2002 - 08:10:31 PDT


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 08-Feb-2012. Archive updated nightly.