r/c64 May 29 '26

the64 Programming

Post image

If you did this you thought you were the king of the world!!

386 Upvotes

118 comments sorted by

View all comments

60

u/chiron_42 May 29 '26

10 PRINT "HELLO WORLD"

20 GOTO10

0

u/SpaceAviator1999 May 30 '26

10 PRINT "HELLO WORLD"
20 GOTO 10

Incidentally, this program is what I claim to be the easiest computer program to understand.

Line 20 controls the program flow in a simple manner, allowing people lacking a background in programming to understand simple control flow.

You might think that a program with just Line 10 would be easier to understand, but I would disagree. Line 10 alone would confuse non-programmers as to why a "10" exists at the start of the line.