Last active
October 17, 2017 02:03
-
-
Save ducc/d2e6ba5fd5dc903e334193d491575ae8 to your computer and use it in GitHub Desktop.
froglang?!?!??!
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
:) |
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
"hello world" | |
and then | |
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
storing a variable called dog and assigning the value as dog | |
dog | |
is 1 | |
storing a variable called favorite animal and assigning the value as frog | |
favorite animal | |
is "frog" |
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
this function takes the input of name, age and returns a string | |
make a string | |
from | |
name string | |
age i32 | |
and then | |
name + " " + age | |
here it takes an input and wraps it in "dab" either side | |
reformat it | |
from | |
input string | |
and then | |
"dab " + age + " dab" | |
ya lol this is just the flow of the program like in python | |
cus we dont want to have a specific main function | |
make a string | |
from | |
name Bob Dillan | |
age 73 | |
and then | |
reformat it | |
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
ya lets build a structure | |
animal | |
from | |
type string | |
and then | |
lower case | |
and then | |
"yo this is an animal" | |
and then | |
lets create a new animal structure with the type name Frog and print | |
out the name property and assign it to the variable favorite animal | |
favorite animal | |
is animal | |
from | |
type "Frog" | |
and then | |
get type | |
now lets get the type property from our favorite animal and then output it with a bit of string concatenation | |
favorite animal | |
get type | |
and then | |
"the favorite animal is " + type | |
and then | |
output: | |
yo this is an animal | |
frog | |
the favorite animal is frog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment