From Esolang
Jump to navigation Jump to search
A program that counts to 10,000.

Read about: Backshar | Backshar+

Is this page categorized incorrectly? Feel free to fix it!

"I am really out of ideas now. Backsharp is the best I can come up with. Seriously, 'BS#' looks stupid as fuck. What am I doing with my life?" Threesodas (talk) 22:44, 26 April 2021 (UTC)

Sometimes, we strive for pain. I wanted to simulate that. Here's Backsharp (BS#).


Unlike Backshar+, Backsharp does not completely use symbols, but is more confusing than Backshar+.


Backsharp splits characters with spaces, but then covers whitespace with periods. For instance, you would write "Hello world and apple banana" like this:


Whitespace within whitespace (spaces) is replaced with +s.

Backsharp still uses symbols, but they each mean different things.

Symbol Use Example
@ Console (or output zone) [@]=>.b.a.c.k.s.h.a.r.p.!.
# Variable #[x]=>.6.9.
% String %.h.e.y.+.g.u.y.s...
$ User input #[x]<=.$.
& Function &.m.y.^f.u.n.c.
^ Uppercase (used in strings) %.^w.e.l.c.o.m.e.+.^h.o.m.e.
\\ Comment \\this does action!

IO functionality

Print something to console:


Square brackets define the next object to be selected, such as a variable, or in this case, the console.
Then, we use the => operator to tell the object that it should spit something out.
If it were a variable, you'd put [@]=>.[.v.a.r.]. .
Ask for a user's name:


Notice that if anything in square brackets only has one character, it does not use periods. However, 2+ characters breaks this rule.
Also, this code uses <=, which means it should receive a value, in this case it's the next line from the console.


Variables can be set like this:


Print a variable:


Set a variable to another variable:


Add two variables together:


(See Operators for a full list of math operators).
Unless you're stupid, you won't need to have to define the variable type. Just in case, here's how it's done:
Replace the # with the variable type.



Create an array like this:


Equivalent to: string[] cars = { "Toyota", "Volvo", "Ford" };


This is an example of a function:

&.m.y.f.u.n.c. &.r.e.t.u.r.n.:.v.o.i.d. &.d.e.f.i.n.e.

Every variable is global by default. Imo, protection keywords are kind of useless. Just don't fucking use the variable later on.

If/else & switch statements

Write an if statement like this:


Write a switch statement like this:




.s.u.m. : add two things
.s.u.b. : subtract two things
.m.u.l. : times two things
.d.i.v. : divide two things
.m.o.d. : calculate the modulo of something
.s.q.t. : calculate the squareroot of something
.s.q.r. : square something
.c.b.e. : cube something


!= : not equal to
== : equal to
>= : greater than
=< : less than
>> : greater than or equal to
<< : less than or equal to


Define a class like this:

&&.m.y.c.l.a.s.s. :>

The main class is always .p.r.o.g.r.a.m., which is needed to run a program.


System data

&&.s.y.s.t.e.m. :> .t.i.m.e.=>#[x] <: : get system time in milliseconds since 2000 (do math to calculate extra stuff)
&&.s.y.s.t.e.m. :> .o.s.=>#[y] <: : get system os
&&.s.y.s.t.e.m. :> .b.i.t.t.y.p.e.=>#[z] <: : get system bit type (32/64 bit)
&&.s.y.s.t.e.m. :> .a.p.p.o.p.e.n.[.a.p.p.n.a.m.e.].=>#[a] <: : check if specified app is open (works with files in general)

Example programs

Simple calculator

&&.p.r.o.g.r.a.m. :>
   [@]=>.m.e.t.a.:.c.l.e.a.r. \\this clears the console completely.


Choose an operator:
Add, sub, mult, div.
Input number 1.
Input number 2.
Result: variable


Backshar: Prequel
Backshar+: Prequel