FakeScript

From Esolang
Jump to navigation Jump to search

FakeScript is an esolang created by User:Viba. The language was meant to be relatively easy to implement for both viba and others who don't know much about programming. FakeScript is quite limited as a result. It was originally written in C#.

The name of the language comes from a Roblox forum post that viba wrote in 2013 when they were 7 years old, containing a program written in a language called FakeScript. Of course, FakeScript didn't become an actual programming language until 8 years later, and the result is very different from the language in the post.

Overview

A program consists of commands followed by arguments (if any). If an argument is #input, it gets the input entered by the user during the previous input command. Each term is separated by a space. Newlines in a program are interpreted as spaces.

Commands

Command Description
print [arg1] Prints the argument to the console.
input Allows the user to enter text as input.
!label [name] Declares a label with the specified name.
goto [label] Jumps to the label with the specified name.
if [arg1] [arg2] [label] If arg1 and arg2 are equal, jumps to the label with the specified name.
stop Stops the program.

Examples

Hello, world!

print HelloWorld!

Note that since spaces are always used to sepearate terms, strings with spaces cannot be printed.

Truth machine

input
if #input 1 1
if #input 0 0
stop
!label 0
print 0
stop
!label 1
print 1
goto 1

See also

External resources