FirstBASIC BCD problem 
Author Message
 FirstBASIC BCD problem

I downloaded FirstBASIC because it says it is compliant to BCD (Binary
coded Decimal).
I need to count up 0.01 100 times like this code

for i=0 to 100
sum=sum+0.01
next i
print sum

On my compyuter it becomes 0.9999993
I need to get exactry 1 as the result.
I heard FirstBASIC can do decimal aritmetic but it is not at least on
my puter.
I heard FullBASIC is compliant to BCD.
Where can I download BCD compliant BASIC interpliter and/or BASIC
compiler?
Or should I get cobol or PL/I ?

--



Sat, 26 Jun 2004 02:35:25 GMT  
 FirstBASIC BCD problem

Quote:
> I downloaded FirstBASIC because it says it is compliant to BCD (Binary
> coded Decimal).
> I need to count up 0.01 100 times like this code

> for i=0 to 100
> sum=sum+0.01
> next i
> print sum

> On my compyuter it becomes 0.9999993
> I need to get exactry 1 as the result.
> I heard FirstBASIC can do decimal aritmetic but it is not at least on
> my puter.

you need to...

FOR I = 0 to 100

NEXT I


Or use a DEFxxx statement on sum

MCM



Sat, 26 Jun 2004 04:55:24 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Text to BCD BCD to Text please.

2. joystick problems in FirstBasic

3. Problem linking .obj files with FirstBasic compiler (error 510)

4. Perplexing Problem (Firstbasic)

5. BCD ADJUSTMENT

6. WHAT IS BCD?

7. Mscomm and capture of BCD

8. BCD Conversion

9. How do I unpack a BCD (Binary coded decimal) field in VB5

10. Hex and BCD and the number of bytes

11. Comparing QB4.5 and FirstBasic

12. FirstBasic?

 

 
Powered by phpBB® Forum Software