Bug in teh program
Jaril
diris at volja.net
Sun Dec 1 17:16:27 UTC 2002
Sirs,
As a trial project I worked on the Path through Net problem, where I use a
Point and Vector model. At some point I encountered a strange situation: the
following code did not work correctly for one of vectors in the helpSet,
though I did test the situation thoroughly and endPoint is postively in
pointsOnPath :
helpSet do: [:vector |
( pointsOnPath includes: (vector endPoint ))
ifTrue: [
helpSet remove: vector ifAbsent: [^'Error 2, class
NetClass']
].
].
But once I applied the following code on the same data:
helpSet := helpSet reject: [:vector | pointsOnPath includes: (vector
endPoint )].
the result was correct.
I am new to ST and can't find my mistake. Any help is appreciated.
LP Jaril Lavrenčič
More information about the Squeak-dev
mailing list
|