Backshar+

From Esolang
Jump to navigation Jump to search

Backshar+, a sequel to Backshar, is a completely symbol-based language. Nothing, unlike Backshar, uses A-Z & 0-9. It was remade like this by threesodas to be more "esoteric". Every single command is the same, except when writing variable names, string names, function names, etc. It uses a combination of symbols to represent the character desired to use.

Syntax

Print & read input

(string)=>[@] : Print a string.
()<=[@] : Read a user input. Does not set input to anything.

Variables

#[var name]=>[value] : Set a variable to value.
#[var name]<=[@] : Set a variable to user input.
#[var name]<=[var name] : Set a variable to another variable's value.
#[var name]<=(type) : Convert a variable to a certain type (string, int, bool, etc.)

Condition Statements

$%(value or var) (condition) (value or var) & : If statement
If statements must use indent.
This is valid code:

$%=#. &# ^#.
  #[\\,]=>=#.
  #[:&,]=>^#.

This is invalid code:

$%=#. &# ^#.
#[\\,]=>=#.
#[:&,]=>^#.

This too is invalid:

$%=#. &# ^#.
  #[\\,]=>=#.
    #[:&,]=>^#.


$&(value or var) & : Switch statement
$@ (condition)=> (action) : Case (Switch statement)

Operators & Conditions

Conditions
!# : Equals (==)
$# : Not equals (!=)
&# : Greater than (>)
*# : Less than (<)
+# : Or (||)
-# : And (&&)
Operators
^% : Plus (+)
@% : Minus (-)
*% : Times(*)
!% : Divide (/)
?% : Join (+)

Comments

_(string) : Single Line Comment
!( + )/ : Multi Line Comment

Functions

@[func name]( + )@ : Function

Time & Date

All info is returned as a numerical value.
*! : Current Day of Month
!! : Current Year
?! : Current Day of Week
$! : Current Month
&! : Current Week
^^ : Current Hour
@^ : Current Minute
#^ : Current Second
Timezones are returned as UTC-6:00 or UTC+5:00.
$^ : Timezone

Symbols which represent characters

Character Combination
Aa #$,
Bb @#,
Cc ^&,
Dd %%,
Ee $+,
Ff ]?,
Gg [@,
Hh !$,
Ii {%,
Jj !,,
Kk ~$,
Ll (@,
Mm :&,
Nn ;@,
Oo )^,
Pp *~,
Qq $$,
Rr ##,
Ss !!,
Tt &&,
Uu {&,
Vv *},
Ww "",
Xx \\,
Yy ">,
Zz //,
0 ??.
1 #@.
2 ^#.
3 %#.
4 :;.
5 =#.
6 (&.
7 %^.
8 [].
9 **.
SPACE !%\
. >?!
, &&!
! !!!
? %#!

Hello, World! Program

("!$,$+,(@,(@,)^,!%\&&!"",)^,##,(@,%%,!!!")=>[@]

Family