Created
March 23, 2018 11:39
-
-
Save versluis/5489dc6828cceb5f0eb49088228e518e to your computer and use it in GitHub Desktop.
Create random YouTube URLs in Commodore BASIC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 print chr$(14) | |
20 gosub 100:x=rnd(-ti):cn=1 | |
30 a$="https://youtu.be/" | |
40 for i=1 to 11 | |
50 rn=int(rnd(0)*62)+1 | |
60 a$=a$+yt$(rn) | |
70 next | |
80 print:print cn;" : ";a$ | |
85 cn=cn+1 | |
90 goto 30 | |
85 cn=cn+1 | |
90 goto 30 | |
100 rem populate array | |
110 dim yt$(62) | |
120 i=1 | |
130 for j=65 to 90 | |
140 yt$(i)=chr$(j) | |
150 i=i+1 | |
160 next j | |
170 for j=193 to 218 | |
180 yt$(i)=chr$(j) | |
190 i=i+1 | |
200 next j | |
210 for j=48 to 57 | |
220 yt$(i)=chr$(j) | |
230 i=i+1 | |
240 next j | |
299 return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've written this code as part of a screencast - check it out here: https://youtu.be/jpvkRiQF2QU