Posted: Mon Apr 14, 2008 4:31 am
Thank you! 

http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
For c = 1 To 10
Debug 0.1 * c
Debug 1 + ( 0.1 * c )
Debug 2 + ( 0.1 * c )
Debug 3 + ( 0.1 * c )
Debug 4 + ( 0.1 * c )
Debug 5 + ( 0.1 * c )
Debug 6 + ( 0.1 * c )
Debug 7 + ( 0.1 * c )
Debug 8 + ( 0.1 * c )
Debug 9 + ( 0.1 * c )
Debug ""
Next
Code: Select all
RESULT:
0.10000000000000001
1.10000002384186
2.09999990463257
3.09999990463257
4.09999990463257
5.09999990463257
6.09999990463257
7.09999990463257
8.10000038146973
9.10000038146973
0.20000000000000001
1.20000004768372
2.20000004768372
3.20000004768372
4.19999980926514
5.19999980926514
6.19999980926514
7.19999980926514
8.19999980926514
9.19999980926514
0.30000000000000004
1.29999995231628
2.29999995231628
3.29999995231628
4.30000019073486
5.30000019073486
6.30000019073486
7.30000019073486
8.30000019073486
9.30000019073486
0.40000000000000002
1.39999997615814
2.40000009536743
3.40000009536743
4.40000009536743
5.40000009536743
6.40000009536743
7.40000009536743
8.39999961853027
9.39999961853027
0.5
1.5
2.5
3.5
4.5
5.5
6.5
7.5
8.5
9.5
0.60000000000000009
1.60000002384186
2.59999990463257
3.59999990463257
4.59999990463257
5.59999990463257
6.59999990463257
7.59999990463257
8.60000038146973
9.60000038146973
0.70000000000000007
1.70000004768372
2.70000004768372
3.70000004768372
4.69999980926514
5.69999980926514
6.69999980926514
7.69999980926514
8.69999980926514
9.69999980926514
0.80000000000000004
1.79999995231628
2.79999995231628
3.79999995231628
4.80000019073486
5.80000019073486
6.80000019073486
7.80000019073486
8.80000019073486
9.80000019073486
0.90000000000000002
1.89999997615814
2.90000009536743
3.90000009536743
4.90000009536743
5.90000009536743
6.90000009536743
7.90000009536743
8.89999961853027
9.89999961853027
1.0
2.0
3.0
4.0
5.0
6.0
7.0
8.0
9.0
10.0
Code: Select all
For c = 1 To 10
Debug StrD(0.1 * c)
Debug StrD(1 + 0.1 * c )
Debug StrD(2 + 0.1 * c )
Debug StrD(3 + 0.1 * c )
Debug StrD(4 + 0.1 * c )
Debug StrD(5 + 0.1 * c )
Debug StrD(6 + 0.1 * c )
Debug StrD(7 + 0.1 * c )
Debug StrD(8 + 0.1 * c )
Debug StrD(9 + 0.1 * c )
Debug ""
Next
You are comparing Debug StrD() to Debug (which then uses something like StrF() ). When Debug prints the float, it is printing all the decimals. When you used Debug StrD() you are using it's default precision and it rounds the value off. Try your example with Debug StrD(0.1 * c,18 ) or Debug StrF(0.1 * c) to see the difference.Falko wrote:Code: Select all
For c = 1 To 10 Debug StrD(0.1 * c) Debug StrD(1 + 0.1 * c ) Debug StrD(2 + 0.1 * c ) Debug StrD(3 + 0.1 * c ) Debug StrD(4 + 0.1 * c ) Debug StrD(5 + 0.1 * c ) Debug StrD(6 + 0.1 * c ) Debug StrD(7 + 0.1 * c ) Debug StrD(8 + 0.1 * c ) Debug StrD(9 + 0.1 * c ) Debug "" Next
Code: Select all
For c= 1 To 10
Debug StrD(0.1 * c) + " :Debug StrD"
Debug StrF(0.1 * c) + " :Debug StrF"
Debug "Debug, with no StrF or StrD:"
Debug 0.1*c
Debug StrD(0.1*c,18)+ " Debug StrD with 18 Decimals"
Debug StrF(0.1*c,18)+ " Debug StrF with 18 Decimals"
Debug "-------------------------"
Next c
That's not the only one that doesn't work, pressing Alt-C, then E to build an executable doesn't work either.mag wrote:When I press Alt + F its open a file menu but when I press N to get command New it not work. It goes to all other command in all menu/submenu
Use the taskmanager and kill the purebasiccompilationX.exemag wrote:I have this error when I try to run code created on previous version with debug on.
"This executable was not compiled for this version of the debugger!
Please recompile it to match this debugger version."
And I don't know how to recompile it.
Sounds like you updated the IDE, but not the debugger library or vice versa.mag wrote:I have this error when I try to run code created on previous version with debug on.
"This executable was not compiled for this version of the debugger!
Please recompile it to match this debugger version."
And I don't know how to recompile it.