Active Forums > Programs
Just a silly "Hello World" Marquis
CharlieJV:
Just a barely tweaked Commodore BASIC program over on Rosetta Code, works in both BASIC Anywhere Machine and QB64.
I was in an old-school BASIC reminiscing mood ...
* view source code
* run program
bplus:
Classic Basic, like the frame!
SierraKen:
That's cool Charlie!
I still remember my first "Hello World" in my High School Apple 2e BASIC class in the 1980's:
10 PRINT "HELLO WORLD"
20 GOTO 10
Muahahahahaha... well, we thought we were cool. :D
bplus:
--- Code: QB64: ---1 Print Mid$("Hello world! ", i + 1) + Mid$("Hello world! ", 1, i)i = (i + 1) Mod 14: _Limit 10: GoTo 1
EDIT: think I have it fixed?
SMcNeill:
Reminds me of the way we ended up doing "Hello World" back in high school where we tried our best to drive our teacher completely insane.
Imagine 30+ old Apple IIc computers running a program very similar to this one (no delays needed back then, of course!):
--- Code: QB64: ---Const Annoying_Sounds = -1 'TRUE! centerText 10, "Hello World", 1centerText 12, "presented by", 1centerText 14, "Steve McNeill", 1centerText 16, "1990, Floyd VA", 1 Sub centerText (y, text$, delay) text$ = _Trim$(text$) 'strip off leading or trailing spaces l = Len(text$) 'length of text If l Mod 2 Then text$ = text$ + " " 'make it even sized length h = l \ 2 + 1 'half length If _PixelSize Then w = _Width \ _FontWidth Else w = _Width End If xLimit = w / 2 - 1 For i = 0 To h - 1 x = 1 Do Locate y, x: Print Mid$(text$, h - i - 1, 1); Locate y, w - x - 1: Print Mid$(text$, h + i, 1); If x > 1 Then Locate y, x - 1: Print " "; Locate y, w - x: Print " "; End If x = x + 1 If Annoying_Sounds Then Sound Rnd * 4000 + 39, delay _Delay delay / 18 Loop Until x > xLimit xLimit = xLimit - 1 NextEnd Sub
Navigation
[0] Message Index
[#] Next page
Go to full version