 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
feejo
Joined: 16 Jun 2007 Posts: 245
|
Posted: Fri Jan 18, 2008 2:11 pm Post subject: Calculus error |
|
|
I got some calculus error on this one, it is designed to tell what number is the biggest in the list under a certain number. The kind of error is if MIN is 3000 a loop field can sometime find out that 700 is the highest number, but it is supposed to be 15000, he choose a lower number but not the bigest that can fit in 15000.
The right calculus is MIN=3000 then 3000/0.2= 15000, what number in that list is highest under or equal to 15000.
| Code: |
t= 0.20
Setbatchlines, 10
MIB := min/t
numberlist =
(
100
200
300
400
500
600
700
800
900
1000
1500
2000
2500
5000
10000
15000
20000
25000
30000
35000
40000
45000
50000
55000
60000
65000
70000
75000
80000
85000
90000
95000
100000
105000
110000
115000
120000
125000
130000
135000
140000
145000
150000
155000
160000
165000
170000
175000
180000
185000
190000
195000
200000
205000
210000
215000
220000
225000
230000
235000
240000
245000
250000
255000
260000
265000
270000
275000
280000
285000
290000
295000
300000
305000
310000
315000
320000
325000
330000
335000
340000
345000
350000
355000
360000
365000
370000
375000
380000
385000
390000
395000
400000
405000
410000
415000
420000
)
Loop, parse, numberlist, `n, `r
{
;the number we are looking at is A_loopfield
if (A_loopfield > mib)
break
else
QAOA := a_loopfield ;this will store each number, in case the next one is too big
} |
|
|
| Back to top |
|
 |
dmatch
Joined: 15 Oct 2007 Posts: 113
|
Posted: Fri Jan 18, 2008 3:54 pm Post subject: Sorry, I Don't See the Problem |
|
|
I don't see any problem with this. If I set min:=3000 at the first of the script and msgbox,%QAOA% at the end, it shows a result of 15000 just as I would expect.
dmatch |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|