swarm-support
[Top][All Lists]
Advanced

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

Tcl/Tk error


From: Theodore C. Belding
Subject: Tcl/Tk error
Date: Thu, 7 Mar 1996 19:24:13 -0500 (EST)

Okay -- I think I've figured it out.  Thanks for the info!  The class I'm 
using ("cell") to implement the cells of the CA contains several C arrays as 
data members (int[] and cell*[]). The Swarm probe interface apparently 
doesn't support C arrays, and this was causing the Tcl errors I was 
getting -- I deleted all calls to the probe interface, and the errors 
stopped.  (I imagine the probe didn't know how to handle my "cell" 
class either...) Here's the class interface:

#define numNeighbors 8

@interface cell: SwarmObject {
        int x, y;                                         // cell's 
coordinates within CA lattice
        int state; // cell's state
        int neighborCount;      // number of on neighbors of cell
 
        Grid2d * world;                           // world (CA lattice)
        int worldXSize, worldYSize;                       // world size
 
        int neighborX[numNeighbors];    // each neighbor's x coord
        int neighborY[numNeighbors];    // each neighbor's y coord
        int neighborState[numNeighbors]; // each neighbor's current state
 
        cell* neighbor[numNeighbors]; // pointer to each neighbor object
}
 


--
Ted Belding            address@hidden or address@hidden
University of Michigan    Division of Computer Science and Engineering
http://www-personal.engin.umich.edu/~streak/



reply via email to

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