C128-GOSUB-WITH-HINT -------------------------------------------------------------------------------------------------- TOOL: BASIC 7.0 {Commodore C128} Language: BASIC Extra: none Author: Misel Zivanovic Note: (C) 27th of SEPTEMBER 2026 - www.lived.ch, mzretro.ch --------------------------------------------------------------------------------------------------- After using BASIC 7.0 for decades, i recently discovered this one by accident! I was typing : 500 gosub 1000]print"done!" You see, i made a mistake! "]" instead of ":". It means i did a typo by holding SHIFT key down. The program actually worked and it took me a while to notice this. That's why i have decide to make this example. This is very good usable in practice because you immediately know what's behind the gosub without having to use additional REM line or REM text in general. --------------------------------------------------------------------------------------------------- list 100 rem gosub with hint 110 scnclr 150 for a=0to63:poke 3584+a,255:next 200 sprite 1,1,1:color 0,1:color 4,1 250 movspr 1,250,100 300 gosub500movesprite 310 goto 300 350 : 400 : 450 : 500 rem sprite movement 550 size=rnd(1)*20 600 if size=10 then sprite 1,1,5,1,1,1 650 if size<10 then sprite 1,1,6,1,0,1 700 if size>10 then sprite 1,1,7,1,1,0 750 return ---------------------------------------------------------------------------------------------------