swarm-support
[Top][All Lists]
Advanced

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

Re: Heatbug.java question


From: Marcus G. Daniels
Subject: Re: Heatbug.java question
Date: 13 Jan 2000 12:11:31 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "DS" == David Smith <address@hidden> writes:

DS> First, the block enclosed by the {} doesn't belong to any function
DS> or operation.

The {} aren't required.  It's just a way to delimit code and variables
in a visible way.  In C, {} are required in order to introduce new
local variables.

DS> Second, the HeatSpace method findExtremeType$X$Y() is supposed to
DS> return a long value, but nothing is assigned that value within the
DS> block.

A heatcell is passed in, and its ivars are assigned findExtremeType$X$Y, and
ten copied out after the call.  (Java doesn't have pointers or multiple
return values.)

DS> Third, What do HeatSpace.hot and HeatSpace.cold do without at
DS> least an empty set of parameter ()'s following. 

See http://java.sun.com/docs/books/jls/html/15.doc.html#41267.

DS> But even if it does that, the whole ghostly function doesn't
DS> do anything anyway.

So you're saying that if you add:

      if (newX != heatCell.x || newY != heatCell.y)
        System.out.println (newX + " -> " + heatCell.x + " " + newY + " ->" + 
heatCell.y);
 
after the call to findExtremeType$X$Y, there is no output?


                  ==================================
   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]