swarm-support
[Top][All Lists]
Advanced

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

Re: List of integers


From: Ken Cline
Subject: Re: List of integers
Date: Tue, 7 Sep 1999 04:18:42 -0400 (EDT)

On Mon, 6 Sep 1999, Daniel Calhoun wrote:

> (This is still swarm-1.4.1.)
> 
> How does one create and manipulate a List of integers, without running into
> pointer-related warnings at compile-time, and Invalid Argument at run-time?
> 
> "Manipulate," here, needs to include the "addLast:" & "contains:" and
> "remove:" messages, as well as using the integers also in a Colormap.

You could use longs and cast them to ids whenever you pass
them into a List method or, if you want to get some OO style
points, wrap the integers in Integer objects (sometimes a
worth while exercise even in a language without operator
overloading =:-)

Hope that helps.

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]