'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