Animation: Difference between revisions

Added Commodore BASIC
m (→‎{{header|Raku}}: 'use v6' obsolete)
(Added Commodore BASIC)
Line 482:
(future-call animator) ;simple way to run animator on a separate thread</lang>
 
=={{header|Commodore BASIC}}==
There is no window management in the stock version of BASIC V2 on the Commodore 64 or VIC 20. This example below is generic enough to use on all Commodore variants. Note: Asterisks (*) may be replaced with Commodore graphics characters for a more decorative "window".
<lang commodorebasicv2>
1 rem rosetta code
2 rem task: animation
10 t$="hello world! ":d=-1
20 print chr$(147);:rem clear screen
30 print "*****************"
35 print "* *"
40 print "* *"
45 print "* *"
50 print "*****************"
60 print "{HOME}{DOWN}{DOWN}{RIGHT}{RIGHT}"t$
70 get k$
75 if k$=" " then d=not d
80 on (abs(d))+1 gosub 1000,1010
90 if k$="q" then print chr$(147):end
95 rem
100 rem between line 80 and line 999
110 rem check for other user input
120 rem and process accordingly
130 rem
999 for i=1 to 100:next:goto 60
1000 t$=right$(t$,len(t$)-1)+left$(t$,1):return
1010 t$=right$(t$,1)+left$(t$,len(t$)-1):return
</lang>
 
=={{header|Common Lisp}}==
113

edits