Tech Support Scam

From Esolang
Jump to navigation Jump to search

Tech Support Scam is an esoteric programming language created by User:CatCatDeluxe where it sounds vaguely like you are on a phone call with a tech support scammer.

Punctuation and capitalization are ignored in Tech Support Scam.

Ignored Words

The words "the" and "ok" are ignored to make it look a little more like natural english.

Literals

There are two types of values in Tech Support Scam, floats and strings. Floats are 64-bit floating point values, and string are, well, strings. Literals can be written directly in the program or stored as variables.

Variables

Declaration / Modification

To declare or change a variable, do this:

put <value> in the file <name>

where <name> is a string of alphanumeric characters.

Access

Variable names can be used in place of any literal.

Calculations

Arithmetic

Addition, subtraction, division, and multiplication are used as follows:

Addition:

x plus y

Subtraction:

x minus y

Multiplication:

x times y

Division:

x over y

Equality testing

Equals, not equals, less than, and greater then are all implemented. You write them like this:

  • "==" → is the same as, equals, equal
  • "!=" → isn't, is not
  • ">" → is more than
  • "<" → is less than

There are no <= or >= operators, as that can be implemented with boolean expressions.

Boolean logic

Booleans are stored as the numbers 1 and 0. The boolean operators are OR, AND, and NOT. You should use them in their lowercase forms, but they are also valid as uppercase because capitalization is ignored.

I/O

Output

To output text, all you need to do is this:

write <text> in notepad

where <text> is a literal or variable name. This should not print a trailing newline.

Input

Inputting text can also be performed, with a number or string. To input a number, do this:

put your phone number into <variable name>

To input a string, do this:

put your password into <variable name>

You can write "in the file" in place of "into" if you want. Input will create a variable if it does not exist.

Flow Control

Goto

Even though I know goto sucks, I couldn't figure out how to make functions fit into the syntax theme of the language. The syntax for creating a label is

make a file called <label name>

where <label name> is a string following the same rules as variable naming.

To go to a label, do this:

go to where <label name> is

If statements

If statements are needed in any programming language, so here they are. To make an if statement, do this:

is <cond>?

or

does <cond>?

where <cond> is any valid expression. The question mark is optional. If the expression is not zero, the next statement is executed. Writing a code block after an if is not supported, because I can't figure out how to fit code blocks into the syntax theme.

Example programs

Cat program

put your password in the file cat
write cat in notepad

Hello World

write "Hello World!" in notepad

Truth machine

put your phone number in the file num
write "\n" in notepad

make a file called loop
write num in notepad
does num equal 1?
go to where loop is

You can edit some more example programs on here if you feel like it.