Your best "Hello, world!" program in FreeBasic - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QbasicNews.Com (http://qbasicnews.com/newforum/forum-3.html) +--- Forum: Challenges (http://qbasicnews.com/newforum/forum-10.html) +--- Thread: Your best "Hello, world!" program in FreeBasic (/thread-8801.html) |
Your best "Hello, world!" program in FreeBasic - stylin - 01-26-2006 Simple. Post a neat "Hello, world!" program. It does not necessarily have to be obfuscated, but should be clever, inefficient, unsafe or otherwise something you shouldn't be doing. The output must only be "Hello, world!" (without quotes). You may submit more than one entry - and are encouraged to do so - but you cannot post consecutive entries; you must wait until at least one entry has been posted before posting again. There are no prizes; everyone is a winner. I'll start: Code: '' : HelloWorld.bas : Your best "Hello, world!" program in FreeBasic - na_th_an - 01-26-2006 I can't get a bit of your code. Are you sure that's BASIC? :lol: That's what I made in 5 minutes, I don't have more than that. It sucks, but looks kinda cool Code: #define World : Locate , 8 - 1 :? "World!" : Obfuscation = 0 Your best "Hello, world!" program in FreeBasic - KiZ - 01-26-2006 [syntax="qbasic"]#define gcfp(num) (val(mid(str(pi), num, 1))) #define gwfp(num1, num2, num3) (chr(val(str(gcfp(piref(num1))) + str(gcfp(piref(num2))) + str(gcfp(piref(num3)))))) dim piref(7) as integer => {7, 13, 15, 4, 1, 8, 3, 0} dim shared pi as double pi = 1 add = 1 for i = 1 to 27 add = add + 2 pow = pow + 1 if sign then pi = pi + (add * 3 ^ pow) ^ -1 else pi = pi - (add * 3 ^ pow) ^ -1 sign = sign xor 1 next pi = 2 * sqr(3) * pi print gwfp(7, 2, 5) + gwfp(6, 7, 6) + gwfp(6, 7, 1) + gwfp(6, 7, 1) + gwfp(6, 6, 6) + gwfp(7, 3, 3); print gwfp(7, 4, 5) + gwfp(6, 6, 0) + gwfp(6, 6, 6) + gwfp(6, 6, 3) + gwfp(6, 7, 1) + gwfp(6, 7, 7) + gwfp(7, 4, 4) sleep[/syntax] I'll give you a cookie if you can work out how it works ^^ Hint: it uses Pi :> Your best "Hello, world!" program in FreeBasic - TheDarkJay - 01-26-2006 My personal favorite Code: #define FacK Print You have to replace the A in Fack and Facker with a u Your best "Hello, world!" program in FreeBasic - thegrogen - 01-26-2006 Code: s: Your best "Hello, world!" program in FreeBasic - DefHo - 01-27-2006 Code: DECLARE FUNCTION bin2string$ (a$) Your best "Hello, world!" program in FreeBasic - SSC - 01-28-2006 Code: dim array(0 to 319, 0 to 199) Your best "Hello, world!" program in FreeBasic - DefHo - 01-28-2006 Quote:I'll give you a cookie if you can work out how it works ^^ gfpw (7, 2, 5) returns "H" (ascii character 72). gfpw (6, 7, 6) returns "e" etc... piref (7) = 0 piref (2) = 15 piref (5) = 8 The first character in pi or mid(str(pi), 0, 1) is " " (It's not 3 because of the space at the beginning of the string. str(pi) = " 3.14159...") The 16th character in pi or mid(str(pi), 15, 1) is "7" The 9th character in pi or mid(str(pi), 8, 1) is "2" Put them together and you get " 72" Hand over my fucking cookie!!! Your best "Hello, world!" program in FreeBasic - thegrogen - 01-29-2006 Quote: *removed code* Code: dim array(319, 199) Fixed. Your best "Hello, world!" program in FreeBasic - SSC - 01-29-2006 hmm? , if you make a print after screen 12 has opened then its a different text size then the one made in 13 displayed on 12 |