Skip to content

Instantly share code, notes, and snippets.

@ducc
Last active October 17, 2017 02:03
Show Gist options
  • Save ducc/d2e6ba5fd5dc903e334193d491575ae8 to your computer and use it in GitHub Desktop.
Save ducc/d2e6ba5fd5dc903e334193d491575ae8 to your computer and use it in GitHub Desktop.
froglang?!?!??!
"hello world"
and then
print
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 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
print
ya lets build a structure
animal
from
type string
and then
lower case
and then
"yo this is an animal"
and then
print
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
print
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
print
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