Hi, all-- Okay, so I am trying to understand how macros work in Factor. I wrote my first macro last night, which looks like this:
MACRO: print-with-suffix ( str -- ) append print ; Then I can define a word in terms of the macro: : print-with-yeah ( str -- ) " yeah!" print-with-suffix ; But then if I try to use the word: "Oh" print-with-yeah ... it prints "Oh yeah!" as expected, but also throws a Data Stack Underflow error. What am I doing wrong? Also, I would like to know the definition of a static stack effect--and how to know if a word's stack effect is static or not. Can anyone explain? Thanks in advance for your help! -- Matt Gushee : Bantam - lightweight file manager : matt.gushee.net/software/bantam/ : : RASCL's A Simple Configuration Language : matt.gushee.net/rascl/ : ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
