I have a program running on my laptop in BBCsdl, but when I transfer it to my phone I get the error "number too big"
That is inconvenient, but is there a way of finding the line at which the error occurs. The program has line numbers.
Kind regards Ric
Number too big
-
- Posts: 200
- Joined: Tue 17 Apr 2018, 21:03
Number too big
Kind Regards Ric.
6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
-
- Posts: 200
- Joined: Tue 17 Apr 2018, 21:03
Re: Number too big
After much messing about with trying to make the programm "mistake" it is this line
ssHead% = FN_imgLoad(@usr$ + "ssHead.png")
that the problem occurs.
yes the file ssHead.png is in the file @usr$
Kind regards Ric
ssHead% = FN_imgLoad(@usr$ + "ssHead.png")
that the problem occurs.
yes the file ssHead.png is in the file @usr$
Kind regards Ric
Kind Regards Ric.
6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
-
- Posts: 272
- Joined: Tue 18 Jun 2024, 09:32
Re: Number too big
The line number at which an error occurs can be found in ERL.
The documentation of the FN_imgLoad() function is quite explicit:After much messing about with trying to make the programm "mistake" it is this line
ssHead% = FN_imgLoad(@usr$ + "ssHead.png")
"The value returned is used to refer to the image subsequently, it must be stored in a 64-bit (%% suffix) or variant (no suffix) variable".
Ignore the documentation at your peril!

-
- Posts: 200
- Joined: Tue 17 Apr 2018, 21:03
Re: Number too big
Thankyou Richard,
rather annoyingly i tried running the program a few times and it only fails occasionally, i assume that the pointer is stored can have a value of less than &FFFFFFFF and if so, the program runs.
Ill try the ERL later when i get home.
Kind Regards Ric
rather annoyingly i tried running the program a few times and it only fails occasionally, i assume that the pointer is stored can have a value of less than &FFFFFFFF and if so, the program runs.
Ill try the ERL later when i get home.

Kind Regards Ric
Kind Regards Ric.
6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
-
- Posts: 200
- Joined: Tue 17 Apr 2018, 21:03
Re: Number too big
Thankyou for the "ERL" nudge, I now have ON ERROR blah blah PRINT REPORT$+" at line "+STR$(ERL) and this works a treat.
Kind regards Ric
Kind regards Ric
Kind Regards Ric.
6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023
6502 back in the day, BB4W 2017 onwards, BBCSDL from 2023