Created
December 27, 2016 03:01
-
-
Save zoffixznet/e8735d377afd352ef5712b4f23fe21a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# subroutine definition: | |
damn sub hello | |
# a built-in to print text to STDOUT: | |
exasperatedly shout 'Hello, World!' | |
goddammit | |
# subroutine call (prints 'Hello, World!') | |
just do hello dammit | |
# class definition: | |
damn class Foo | |
damn method bar | |
exasperatedly shout 'Hello, Classes!' | |
goddammit | |
damn method random | |
4 | |
goddammit | |
goddammit | |
# class method call: | |
Foo's dam bar | |
# variables: | |
a is goddamm 5 # a number | |
b is goddamm "meow" # a string | |
c is goddamm Foo but damn fine # an instantiated object | |
# print several variables, calling a method on variable c | |
exasperatedly shout a, b, c's dam random |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment