swarm-support
[Top][All Lists]
Advanced

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

Re: double arguments


From: Ken Cline
Subject: Re: double arguments
Date: Thu, 23 Jul 1998 23:37:02 -0400

Amber L. Hinkle wrote:

> > ----------
> > From:         Amber L. Hinkle[SMTP:address@hidden
> > Sent:         Thursday, July 23, 1998 4:18:54 PM
> > To:   address@hidden
> > Subject:      double arguments
> > Auto forwarded by a Rule
> >
>         I was wondering how to call messages with 2 arguments
>
> I know one is M(test:) : (id)item
>
> but how do you do two,
>
>  my function is computeProfit (double) price and: (double)totalcost

This would be:
      M(computeProfit:and:) : (id)price : (id)totalcost

*However*, you can't cast a double to an id... [sigh]... I know of two
suggested workarounds:
      1. Wrap the double in an object, or
      2. Change the method signature to use double pointers.

Both workarounds have drawbacks, see
http://www.santafe.edu/projects/swarm/archive/list-archive.9708/0128.html

Ken.



                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

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