Back

SymbolScript

A new computer language

After an extensive amount of work, I have created a programming language and an interpreter to go along with it! This is the guide to this langauge- the language I've dubbed SymbolScript.

Complete Guide to SymbolScript

Basics

Every line in SymbolScript begins with a symbol- and different symbols mean different things. For example, > will output text to the console. Every line ends in a semicolon.

In SymbolScript, spaces are not ignored. However, more two or more spaces next to each other will be converted to single spaces, and new lines will be removed. Any text between two ~ are comments and will be ignored.

Some symbols

Here are a few of the symbols in SymbolScript, what they do, and some examples!

@ ends the program. @;

The > command will print text or a variable to the console. > Hello, world!;

>> will print text or a variable to the console, then add a new line. >> Hello, world! Again!;

*/ clears all text in the console, *^ sets the background color, and *& sets the text color. *& white; *^ black; */;

# defines a numerical variable. Optionally, you can give the variable a starting value. # myNumber 10; ~ The value of myNumber is "10". ~

& is like #, but defines a variable that holds text. & myText Hi!; ~ The value of myText is "Hi!" ~

Setting Variables

In a typical programming language, you would say something like x = 1 to set a variable to a value. However, being prefix-ooriented, SymbolScript has individual commands for setting variables to different values.

= sets a variable to a value. # myNum; = myNum 20;

=+ increases a variable by a value. It can also combine a text variable with more text. # myNum 5; & myText Hi ; =+ myNum 5; ~ The value of myNum is 10 ~ =+ myText There; ~ The value of myText is Hi There ~

=- decreases a variable by a value, and can remove text from a text variable. # myNum 5; & myText BobEvans; =- myNum 3; ~ The value of myNum is 2. ~ =- myText Evans ~ The value of myText is Bob ~;

Some other equals symbols that work similarly (but can only be used on number variables) are =*, which multiplies a variable by a value, and =/, which divides a variable by a value.

++ increases a variable by 1, -- decreases a variable by 1, =-- makes positives negative and vice versa, and =++ sets a variable to its absolute value. Also, =, sets a variable to itself rounded to the nearest whole number. # myNum; ~ By default, numbers have a value of 0 and text has a value of nothing. ~ ++ myNum ~ myNum has the value of 1. ~ =-- myNum ~ myNum is -1. ~ =++ myNum ~ myNum is 1. ~