swarm-support
[Top][All Lists]
Advanced

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

Re: Macro Usage---further problem


From: xueyue
Subject: Re: Macro Usage---further problem
Date: Tue, 27 Apr 1999 11:18:05 +0000

Marcus G. Daniels wrote:
> 
> >>>>> "XH" == xueyue  <address@hidden> writes:
> 
> XH> [growthSchedule at: time+growthInterval
> XH>      createActionTo: foodSpace
> XH>               message: M(putValue:atX:Y:):1:x:y];
> 
> XH> egcs -c -Wno-import -Wno-protocol -g -O2 -fno-inline -D_GNU_SOURCE
> XH> -I/usr/include/swarm ModelSwarm.m
> XH> ModelSwarm.m: In function `_i_ModelSwarm__scheduleGrowthAtX_Y_':
> XH> ModelSwarm.m:191: warning: passing arg 4 of
> XH> `at:createActionTo:message::::' makes pointer from integer without a cast
> XH> ModelSwarm.m:191: warning: passing arg 5 of
> XH> `at:createActionTo:message::::' makes pointer from integer without a cast
> XH> ModelSwarm.m:191: warning: passing arg 6 of
> XH> `at:createActionTo:message::::' makes pointer from integer without a cast
> 
> To avoid warnings, use "(id) 1 : (id) x : (id) y" instead of "1:x:y".
> The reason this works is that integers and pointers are the same
> size on most machines.


Alright, it will work in this way. However, I am afraid there 
is further problem: what if the arguments data types are not
integer? For example, for a method:
-stepFloat:(float) f Double: (double) d;
can we use
M(stepFloat:Double:):0.3:0.5 ....?
It seems the answer to this question is not, from my 
experience. If my answer is true, then this Macro selector
has clearly a setback.
Xueyue

Xueyue

Attachment: vcard.vcf
Description: Card for Xueyue Huang


reply via email to

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