0.25 - 0.25 <> 0

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Shaun_B
Posts: 474
Joined: Wed Apr 22, 2009 10:22 am

Re: 0.25 - 0.25 <> 0

Post by Shaun_B »

dr beep wrote: Wed Mar 01, 2017 10:25 am And as for keeping the quarters on display on the ZX80:
LET M=INT (T/4)
LET Q=(T-M*4)*2+1
PRINT M;".";"00255075"(Q TO Q+1)
If the number goes negative, you will need a condition to check and reverse the string or something like that.

Regards,

Shaun.
dr beep
Posts: 2059
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: 0.25 - 0.25 <> 0

Post by dr beep »

Shaun,

The test on M going under 0 must be done when money is decreased, not at the display.
Post Reply