Skip to content

Commit

Permalink
Update documentation for cat to nyan
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelDeimos committed Oct 31, 2017
1 parent 8d9095a commit 1706826
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ Output
Hello, Boi!
```

#### `cat` function
The cat function takes any number of parameters, strings them
#### `nyan` function
The nyan function takes any number of parameters, strings them
together and returns the output so it's available in the
`ret:exit` variable.

Expand All @@ -82,8 +82,8 @@ is, well, a calculator.

Conditionals aren't very useful in Boi-lang yet, but here's an example anyway:
```
boi? cat true boi
boi! say "the cat function returned true" boi
boi? nyan true boi
boi! say "the nyan function returned true" boi
BOI
```

Expand Down
12 changes: 6 additions & 6 deletions demo.boi
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ BOI
-- any function. This is done using square brackets as follows:
boi, [returny] boi
boi: tmp [returny] boi
boi, "tmp is: ", boi:tmp boi
boi, "tmp is: " boi:tmp boi

-- next, let's look at some built-in functions
boi, [cat a b c boi:tmp] boi
boi, [nyan a b c boi:tmp] boi

boi: myInteger [int 42] boi
boi, "myInteger as a char: " boi:myInteger boi
Expand Down Expand Up @@ -70,16 +70,16 @@ boi, "1 + 2 = " [dec [+ boi:a boi:b]] boi

-- we can access the "exit" value returned by a
-- function using "ret:exit"
boi! cat one two three boi
boi! nyan one two three boi
boi, ret:exit boi

-- conditionals are a thing. The things "true"
-- and "false" are the standard boolean values.
boi? cat true boi
boi? nyan true boi
boi, "this will appear" boi
BOI

boi? cat false boi
boi? nyan false boi
boi, "this will not appear" boi
BOI

Expand All @@ -88,7 +88,7 @@ BOI
-- syntax "ONE varname BOI". Note that declaring a
-- variable will explicitly set it to a random value.
ONE CHANGEY BOI
boi? cat true boi
boi? nyan true boi
ONE CHANGEY BOI
boi, "value is " boi:CHANGEY boi
BOI
Expand Down

0 comments on commit 1706826

Please sign in to comment.