[futurebasic] C Style Macros?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1997 : Group Archive : Group : All Groups

From: tatewake@... (Terence Jordan)
Date: Sat, 20 Dec 1997 10:25:23 -0400
--
I was recently playing with some C source; and I came across some of these
"Macro" Statements

>BYTE bfyr;
>/* For convenience */
>#define A bfyr

As I see it, these Macros mean that if I were to say A=5, bfyr would equal 5??

I'm sure there's a tricky way to do this successfully... is there?

I'm thinking:
DIM A;0
DIM bfyr;1

And then I can say:
A=5
print bfyr
and it will print "5"

I seem to have solved the original question just by thinking it through, so
here's three other questions...

#1, will that work all the time?
#2, is that what a Macro does to begin with?
#3, will a @A and @bfyr be equal to each other? They would share the same
pointer, correct?

Thanks...



-- Terence Jordan (tatewake@...)
Inspired Software. http://inspired.netstreet.net/
Macintosh, Dos, Windows, and BeOS software solutions.
Phone: 407-728-7563
............................................
. New: Renegade Space Ninja for Macintosh! .
.      Visit our page for more info.       .
............................................