0.25 - 0.25 <> 0

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

Re: 0.25 - 0.25 <> 0

Post by Shaun_B » Wed Mar 08, 2017 11:33 pm

dr beep wrote:
Wed Mar 01, 2017 9: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: 1045
Joined: Thu Jun 16, 2011 7:35 am
Location: Boxmeer

Re: 0.25 - 0.25 <> 0

Post by dr beep » Thu Mar 09, 2017 4:18 pm

Shaun,

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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests