Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
another variation of "10 PRINT"
#8
(01-11-2025, 11:48 PM)bplus Wrote: That is certainly way more difficult than this:
Code: (Select All)
10 _Font 8: cnt = cnt + 1: If cnt < 1921 Then If Rnd < .5 Then Print "\";: GoTo 10 Else Print "/";: GoTo 10

I had to pester the other devs and dig into why this is such crappy code (and that's not saying @bplus is a crappy coder; that's just saying *THIS* is some crappy code), and after some digging and annoying everyone else, here's the issue:

_FONT shouldn't be called endlessly inside a loop like this!!

In a text screen (like the SCREEN 0 that we default to, and which is in play here), _FONT requires a complete redraw and resize of the entire screen *each and every* time it's called!   

So what's going on here is:

_Font 8:  Redraw and Resize entire screen
cnt = cnt + 1: increase count
IF cnt....   draw our slash and repeat entire process 1920 times

That 1920 calls to _Font 8 is the issue.  You really don't need that pause for redrawing and resizing, and it certainly doesn't play nice with early termination of the program.

Lesson learned here??

Keep _Font calls to a minimum and definitely don't include them into the middle of a loop like this.  Not unless you just WANT to generate issues for your programs and make them unstable for some odd reason.
Reply


Messages In This Thread
another variation of "10 PRINT" - by hsiangch_ong - 12-27-2024, 04:55 PM
RE: another variation of "10 PRINT" - by Jack002 - 01-09-2025, 11:54 PM
RE: another variation of "10 PRINT" - by bplus - 01-11-2025, 06:13 PM
RE: another variation of "10 PRINT" - by SMcNeill - 01-11-2025, 10:28 PM
RE: another variation of "10 PRINT" - by bplus - 01-11-2025, 11:48 PM
RE: another variation of "10 PRINT" - by SMcNeill - 01-11-2025, 11:58 PM
RE: another variation of "10 PRINT" - by SMcNeill - 01-12-2025, 12:35 AM
RE: another variation of "10 PRINT" - by bplus - 01-12-2025, 12:41 AM
RE: another variation of "10 PRINT" - by SMcNeill - 01-12-2025, 12:43 AM
RE: another variation of "10 PRINT" - by SMcNeill - 01-12-2025, 12:48 AM
RE: another variation of "10 PRINT" - by bplus - 01-12-2025, 12:53 AM
RE: another variation of "10 PRINT" - by JRace - 01-12-2025, 02:03 AM
RE: another variation of "10 PRINT" - by SMcNeill - 01-12-2025, 02:23 AM
RE: another variation of "10 PRINT" - by bplus - 01-12-2025, 02:52 AM
RE: another variation of "10 PRINT" - by JRace - 01-12-2025, 03:11 AM
RE: another variation of "10 PRINT" - by SMcNeill - 01-12-2025, 03:24 AM
RE: another variation of "10 PRINT" - by bplus - 01-12-2025, 03:23 AM
RE: another variation of "10 PRINT" - by JRace - 01-12-2025, 03:47 AM
RE: another variation of "10 PRINT" - by Jack002 - 01-12-2025, 07:45 PM
RE: another variation of "10 PRINT" - by bplus - 01-12-2025, 09:02 PM
RE: another variation of "10 PRINT" - by Jack002 - 01-13-2025, 02:56 PM
RE: another variation of "10 PRINT" - by JRace - 01-13-2025, 10:16 PM
RE: another variation of "10 PRINT" - by Jack002 - Yesterday, 10:05 PM
RE: another variation of "10 PRINT" - by SMcNeill - 01-13-2025, 02:12 PM
RE: another variation of "10 PRINT" - by bplus - 01-13-2025, 04:25 PM
RE: another variation of "10 PRINT" - by JRace - 01-13-2025, 06:24 PM
RE: another variation of "10 PRINT" - by SMcNeill - 01-13-2025, 06:44 PM
RE: another variation of "10 PRINT" - by JRace - 01-13-2025, 07:03 PM
RE: another variation of "10 PRINT" - by bplus - 01-13-2025, 07:51 PM
RE: another variation of "10 PRINT" - by Jack002 - Yesterday, 09:59 PM
RE: another variation of "10 PRINT" - by bplus - Yesterday, 01:39 AM
RE: another variation of "10 PRINT" - by JRace - Yesterday, 02:16 AM
RE: another variation of "10 PRINT" - by bplus - Yesterday, 02:27 AM
RE: another variation of "10 PRINT" - by JRace - Yesterday, 02:33 AM



Users browsing this thread: 57 Guest(s)