close
Warning:
Can't synchronize with repository "(default)" (/var/svn/mms does not appear to be a Subversion repository.). Look in the Trac log for more information.
| File checkErrors.tol, 788 bytes (added by Pedro Gea, 14 years ago) |
|
|
| Line | |
|---|
| 1 | |
|---|
| 2 | ////////////////////////////////////////////////////////////////////////////// |
|---|
| 3 | Set CheckErrors(Set objects, Code function, Real trace) |
|---|
| 4 | ////////////////////////////////////////////////////////////////////////////// |
|---|
| 5 | { |
|---|
| 6 | Real i = 0; |
|---|
| 7 | Real n = Card(objects); |
|---|
| 8 | Real showEach = Round(1/trace); |
|---|
| 9 | Text format = "%0"<<(Real Floor(Log10(n))+1)<<".0lf"; |
|---|
| 10 | Select(objects, Real (Anything object) { |
|---|
| 11 | Real If(trace>0, { |
|---|
| 12 | Real i := i+1; |
|---|
| 13 | If(((i-1)%showEach)==0, { |
|---|
| 14 | WriteLn("Element "<<FormatReal(i, format)<<" - " |
|---|
| 15 | <<FormatReal(n, format)<<": '"<< Name(object)<<"'"); |
|---|
| 16 | 1}) |
|---|
| 17 | }); |
|---|
| 18 | Real nError = Copy(NError); |
|---|
| 19 | Real preShow = Show(False, "ALL"); |
|---|
| 20 | Anything function(object); |
|---|
| 21 | Real Show(preShow, "ALL"); |
|---|
| 22 | nError!=NError |
|---|
| 23 | }) |
|---|
| 24 | }; |
|---|
Download in other formats: