Back yet?
Ok, here ya go:
file: lolcode.bi
Code: Select all
'LOLcode for FreeBASIC version 1.02
'Not to be cornfuzzled with LOLcode version 1.0
'This supports somewhere between LOLcode version 1 and LOLcode version 1.2
'Copyright (c) 2007 Ebben Feagan (sir_mud)
'Licenced under the terms of the GNU General Public License
'General Section
#define CAN_HAS #include once
#define STDIO "lolcode.bi"
#define HAI declare sub main(): main(): sub main()
#define KTHXBYE end sub 'ends the program
#define BTW rem 'The real way to make a comment
#define BRB(x) sleep x
#define CANDLEJACK(x,y,z) mid(x,y,z)
#define EPIC_FAIL end
#macro HALP(x)
print "DO NOT WANT: " & #x
end 255
#endmacro
'Graphics
#define IT_CAN_BE_PRETY_PICTRS_TIEM_NOW screenres
#define CHEX_MAH_SKILZ glbegin 'Requires CAN_HAS "GL/gl.bi"
#define DEMS_TITE_RITE glend
#define GIT_MAH_PIX bload
#define HAS_MAH_PIX bsave
#define DOODL draw
#define DOT pset
#define UNDOT preset
#define MAH_LAZER line
#define A_MOUF circle
#define ITZ_MINE_NOW get
#define U_CAN_HAS put
#define FLIPN_MAH_LIDZ flip
#define SPLL_MAH_PANT paint
#define BUNCHA_KEYZ multikey
#define GETZ_DAT_MOUS getmouse
#define FORGETS cls
'Types, supporting private and public directives
#define THIS_SAMMICH_IS type
#define MINE_ONLY private:
#define I_SHAR_DEES public:
#define NO_MOAR_SAMMICH end type
'Subroutine - no return value
'O_HAI_IM must come before the HAI line
#define O_HAI_IM declare sub
#define HAI_IM sub
#define THXBYE end sub
'Function - returns a value
'O_HAI_U_HAS_A must come before the HAI line
'example function prototype: O_HAI_U_HAS_A two( foo as NUMBR ) I_GIEF NUMBR
#define O_HAI_U_HAS_A declare function
#define I_GIEF as
#define HAI_U_HAS_A function
#define HAR_YA_GO(x) return x
#define DONE_GIEFING end function
'Da Maths
#define UP +
#define UPZ +=
#define NERF -
#define NERFZ -=
#define TIEMZ *
#define TIEMZD *=
#define OVAR /
#define OVARD /=
#define LIEK = 'equality operator
#define R = 'assignment operator
#define LEFTOVER mod
#define BOOM ^
#define BOOMZ ^=
#define BIGR_THAN >
#define LES_THAN <
#define XORZ xor
#define ORZ or
'Variable creation::example: I_HAS_A longcat ITZ_A YARN ITZ "Longcat is long"
'or this: I_HAS_A tacgnol ITZ_A NUMBR ''dim tacgnol as integer
'continued: LOL tacgnol R 23 ''tacgnol = 23
#define I_HAS_A dim
#define BIG_OL shared
#define ITZ_A as
#define ITZ =
#define LOL let
'Variable types
#define NUMBR integer
#define BIG_NUMBER long
#define YARN string
#define NUMBAR single
#define BIG_NUMBAR double
#define TROOF byte
#define WATCHR ptr
'I/O
#define GIMMEH input
#define VISIBLE print
#define WIF using
#define GIMMEH_THAT open
#define I_WANNA for
#define REED_IT input
#define STROK_IT binary
#define WRIT_IT output
#define FINIS_IT append
#define PUT_IN as
#define MAH_MOUF #1
#define MAH_LEF_HAND #2
#define MAH_RITE_HAND #3
#define MAH_LEF_FEET #4
#define MAH_RITE_FEET #5
#define MAH_POOPR #6
'If...then...else...end if
#define IZ if
#define O_RLY then
#define YA_RLY REM
#define NOWAI else
#define KTHX end
#define IZ_K if
'Select...case
#define SRSLY_WHAT_IZ select case
#define MEBBE_ITZ case
#define WHATEVAR case else
#define OK_SRSLY end select
'Looping
#define IM_IN_YUR_LOOP do
#define TIL until
#define WILE while
#define GTFO exit
#define YUR_LOOP loop
#define IM_OUTTA_YUR_LOOP loop
'For...Next
#define OMG for
#define TOO to
#define WTF next
'True and False
#define WIN 1
#define FAIL 0
'Miscellaneous
#macro LET_ME_SHOW_YOU_MY_POKEMANS()
scope
randomize timer
dim as integer n
dim as integer MAXPKMN = 3
n = int(rnd(1)*MAXPKMN)
select case n
case 0
print "/----------------------------------------\"
print "|._ _.-| |"
print "||_~~`--._ _.-~ / |"
print "| ~-._ ~-._.-~~~~~~~-.-~ _.~ |"
print "| ~-._ / \_.-~ |"
print "| | .-. .-. | |"
print "| |. |_| . |_| | __.-||"
print "| / .__, | _.--~ ||"
print "| \ /_--~~ \ / |"
print "| /~-._______.-~ \ |____| |"
print "| | / \ | / |"
print "| ~|_ |_|_-~~ / |"
print "| | ~-\_/-~ | _~ |"
print "| | | | / _-~ |"
print "| | | / |__---~ |"
print "| |,_|,_|____( |"
print "|----------------------------------------|"
print "| #113 Evee |"
print "\----------------------------------------/"
case 1
print "/---------------------------------------------\"
print "|.__ __. |"
print "| \ `\~~---..---~~~~~~--.---~~| / |"
print "| `~-. ` .~ _____|"
print "| ~. .--~~ .---~~~ /|"
print "| / .-. .-. | <~~ __/ |"
print "| | |_| |_| \ \ .--' |"
print "| /-. - .-. | \_ \_ |"
print "| \-' -..-..- `-' | \__ \_ |"
print "| `. | _/ _/ |"
print "| ~- .,-\ _/ _/ |"
print "| / -~~~~\ /_ /_ |"
print "| | / | \ \_ \_ |"
print "| | / / / | _/ _/ |"
print "| | | | / .,-|/ _/ |"
print "| )__/ \_/ -~~~| _/ |"
print "| \ / \ |"
print "| | | /_---` |"
print "| \ .______| ./ |"
print "| ( / \ / |"
print "| `--' /__/ |"
print "|---------------------------------------------|"
print "| #25 Pikachu |"
print "\---------------------------------------------/"
case else
print "/--------------------------------\"
print "| ___ |"
print "| _.-~~ ~~~-. |"
print "| / _ ~. |"
print "| |#` /#` \ |"
print "| |-'| |-'| | |"
print "| /-- -- |-. |"
print "| \__ . . / /\_ |"
print "| \ ~~--___---~~/\| | ~-. |"
print "| .---`~~--____---_) \ \-__ \ |"
print "| ) < |__ __\_ \ \ | |"
print "| ~-.__ / ~~~~ \ \ \ | |"
print "| ~-. | .~-.-' | | |"
print "| | \___|___/ / / ||"
print "| | / | \ | | / ||"
print "| \ | ~-___ \ \/ / |"
print "| /\__ / `._ / ~-\ \_/ |"
print "| / \_____| |`~ |"
print "| | | | | |"
print "| \ | | | |"
print "| >______) /_/\/\_\ |"
print "|--------------------------------|"
print "| #7 Squirtle |"
print "\--------------------------------/"
end select
end scope
#endmacro
*edited*
Most recent version here always now, changelog in new posts.
KTHXBYE