There must be a better way

Emp empty at nomail.com
Tue Aug 1 20:49:44 PDT 2006


Thanks for the maths :)
The maximum are not constant and writing out the place they live would yield 
to something like:

array[wrap(something[var].maxX,currentX)][wrap(something[var].maxY,currentY)];

So the int was a bit of a hack... sorry :)

About the inout:
How would you do something like this?

bool something(inout structure struc ,int var){
  for (int i=0; i < struc.data[].length; i++){
    if(struc.data[i].count==0){
      struc.data[i].type=var;
      struc.data[i].count=30;
      return true;
    }
  }
  return false;
}










More information about the Digitalmars-d-learn mailing list