swarm-support
[Top][All Lists]
Advanced

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

Macro Usage


From: xueyue
Subject: Macro Usage
Date: Sun, 25 Apr 1999 17:57:26 +0000

Here is a specific problem about a macro usage: selector.
Problem comes from  
"/home/swarm/swarm/swarmfest99-demos/simpleObserverBug-growth/ModelSwarm.m"
in which there is a method call:
 [growthSchedule at: time+growthInterval
      createActionTo: foodSpace
                  message: M(putValue:atX:Y:):1:x:y];
where the whole code is compliled through MAKE, the following 
message is displayed:
egcs -c -Wno-import -Wno-protocol -g -O2 -fno-inline -D_GNU_SOURCE
-I/usr/include/swarm ModelSwarm.m   
ModelSwarm.m: In function `_i_ModelSwarm__scheduleGrowthAtX_Y_':
ModelSwarm.m:191: warning: passing arg 4 of
`at:createActionTo:message::::' makes pointer from integer without a
cast
ModelSwarm.m:191: warning: passing arg 5 of
`at:createActionTo:message::::' makes pointer from integer without a
cast
ModelSwarm.m:191: warning: passing arg 6 of
`at:createActionTo:message::::' makes pointer from integer without a
cast

I remember I once raised this question to swarm-support before, but I
was told to avoid this usage (i.e., do not pass 
arguments (such as 1, x, y) to the method selected by Macro 
selector M. In other word, M(step) is ok, and M(stepAt:):1 is 
wrong. 
Now, the compiling error message may indicate the same thing.
Can anyone point out the error message is coming from compiler
or from wrong usage? 
Many thanks!



-- 
Dr Xueyue Huang
Center for Transport Studies
Imperial College 
London SW7 2BU

(+44) 171 594 6037

Attachment: vcard.vcf
Description: Card for Xueyue Huang


reply via email to

[Prev in Thread] Current Thread [Next in Thread]