Re: A92: Macros


[Prev][Next][Index][Thread]

Re: A92: Macros




---Gregory J Stotts <gstotts@iastate.edu> wrote:
>
> 
> 	How do I go about making a macro in my programs?  I'm a bit of a
newbie at
> Fargo programming so humor me if its as simple as a #define statement.
> Thanks!

Making a fargo macro is quite easy (but takes big place in memory).
You just have to write it like that :

    include "tios.h"
    include "...   "
    .
    .
    xdef _main 
    xdef _comment

;here you can place every macros you want like that :
testmacro1       MACRO
;and you write the macro here
                 ENDM

Then you can call your macro simply by entering :
testmacro1 arg1,arg2    ;for example

Inside your macro, you can reach the arguments you pass to it by /1
for the first argument, /2 for the second, etc...

Note : You can also define your macros in an other program, and
include it at the beginning of your program (so you don't have to
redefine the macro at each new program you make).

I hope this will be helpful, if you have any problem mail-me.

Bye
==
_________________________________
TCHI
Christophe FONDACCI

E-mail : tchi_98@yahoo.com
ICQ    : 12252327
_________________________________
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


Follow-Ups: