Skip to content
WlodekM edited this page Feb 19, 2025 · 5 revisions

bsl (backslash script) is a programming language made by me :3 for making backslash projects

it is inspired by c like programming languages such as javascript, javascript and javascript

the super awesome bsl tutorial

basics

including

in backslash every* block needs to be included first

the inclde format looks like this

#include <"INCLUDETYPE" "PATH/URL">

example:

#include <"blocks/js" "tw-blocks/blocks_vertical/control.js">

this will include the control category from turbowarp

base.js

but what if you dont want to include every single category from scratch, thats why i made base.js!

just add this to your code

#include <"blocks/js" "base.js">

and all scratch blocks will be included in your code

hats

hat blocks are the start of execution in scratch, blocks like when greenflag clicked, when i receive [v event] and such

the sytax for them looks like this:

event_whenflagclicked() {
    // ...
}

but what if you dont want to type all that for just a simple when greenflag clicked, thats why i added gf {}

instead of doing all that just add this

gf {
    // ...
}

reporters

reporters are the basic, everyday blocks, like move (steps) steps

the syntax for them is like calling a function in most programming languages

OPCODE(ARG1, ARG2, ...)

for example:

motion_gotoxy(5, 5)

opcodes are usually similar to the block's name in the editor but they can be different, that's why i recommend using the bsl VSCode extension

branch blocks

branch blocks (eg. if, ifelse) are like reporters but they also have branch inputs that you can put blocks in

the syntax is also fairly simple

OPCODE(ARG1, ARG2, ...) {
    // ...
}

for example:

control_if(true) {
    // ...
}

if there are more branches just add them after

example:

control_if_else(false) {
    // ...
} {
    // ...
}
Clone this wiki locally