Search found 4 matches

by my216
Tue Mar 19, 2024 5:50 pm
Forum: ZX BASIC
Topic: Strange integer behaviour
Replies: 11
Views: 3283

Re: Strange integer behaviour

Thank you. I'll take a look at those programs.
by my216
Tue Mar 19, 2024 3:14 pm
Forum: ZX BASIC
Topic: Strange integer behaviour
Replies: 11
Views: 3283

Re: Strange integer behaviour

yep, but what it doesn't say is that although all digits of 4294967295 are apparently stored, if you do STR$ A (assuming the number is in A) you do not get "4294967295" but "4294967300"
by my216
Mon Mar 18, 2024 2:17 pm
Forum: ZX BASIC
Topic: Strange integer behaviour
Replies: 11
Views: 3283

Re: Strange integer behaviour

But it's not just printing. As converting the stored value to a string will also give the rounded to 8 digits number.
by my216
Sun Mar 17, 2024 10:17 pm
Forum: ZX BASIC
Topic: Strange integer behaviour
Replies: 11
Views: 3283

Strange integer behaviour

It's been 40 years since I last wrote any code for the ZX81 and I've forgotten any idiosyncrasies it may have had. If I assign a number to a variable that is greater than 8 digits and then retrieve it with Print it is returned rounded.For example: LET A = 123456789 PRINT A 1234567900 Also, if I conv...