text stringlengths 0 721 |
|---|
- Always use a function's return value assign with `LET` or consume with `PRINT` or `IF` |
- If a feature isn't documented in this guide, say so rather than inventing one BazzBasic does not silently inherit QBASIC, FreeBASIC, or VB conventions |
--- |
## ABOUT |
BazzBasic is built around one simple idea: starting programming should feel nice and even fun. Ease of learning, comfort of exploration and small but important moments of success. Just like the classic BASICs of decades past, but with a fresh and modern feel. |
### What people have built with it |
BazzBasic is built for beginners, but it isn't a toy. It can carry real 2D games and even 2.5D graphics work. |
- https://github.com/EkBass/BazzBasic/blob/main/Examples/Voxel_terrain.bas |
A Comanche-style heightmap renderer with procedurally generated terrain. Eight smoothing passes turn random noise into hills, valleys, water, beaches, forests, rock, and snow each assigned a color by height band. |
- https://github.com/EkBass/BazzBasic/blob/main/Examples/Raycaster_3d_optimized.bas |
A smooth first-person raycaster engine written entirely in BazzBasic. Minimap, depth shading and real-time movement proves that BazzBasic can handle serious graphics work. |
- https://ek-bass.itch.io/rgb-vision |
A speedrun platformer made for Jam for All BASIC Dialects #7 (itch.io). |
- https://github.com/EkBass/BazzBasic/blob/main/Examples/2D_maze_FOV_demo_console.bas |
2D maze with FOV in your console |
- https://ek-bass.itch.io/eliza-bazzbasic-edition |
A classic DOCTOR script from the 60s which made people honestly believe they are talking to a real human. Grandmother of modern AIs. |
- https://github.com/EkBass/BazzBasic/blob/main/Examples/rosetta-code/BrainFuck.bas |
BrainFuck interpreter. One of the first programs ever done with BazzBasic. |
- https://github.com/EkBass/BazzBasic/blob/main/Examples/Anthropic_Claude_API_call.bas & https://github.com/EkBass/BazzBasic/blob/main/Examples/OpenAI_request.bas |
Anthropic Claude API and OpenAI ChatGPT API available, both with less than 50 lines of code. |
**Note:** All ".../Examples/..." codes are delivered with BazzBasic and they are found on the BazzBasic executable folder. |
### STORY |
Although over the years, as my own skills have grown, I have moved on to more versatile and modern languages, BASIC has always been something that has been fun to try out many different things with. Sometimes it's great to just make a simple adventure game again, a lottery machine, a quiz, or even just those balls boun... |
To arouse your curiosity. |
*EkBass*, author of BazzBasic |
--- |
## Case sensitivity |
BazzBasic is not case-sensitive except with string contents. |
```basic |
let blaa$ = "Hello" |
PriNT BLAA$ ' output: Hello |
``` |
--- |
## Line Continuation |
BazzBasic has **no line-continuation character**. Do not generate `_` (VBA), `\` (Python), or `&` (other dialects). The lexer figures out continuation automatically using two rules. |
**Rule 1 operator at end of line.** If a line ends in a token that cannot legally end an expression, the next line continues it: |
```basic |
LET total$ = price$ * count$ - |
discount$ |
IF score$ >= 0 AND |
score$ <= 100 THEN |
PRINT "Valid" |
END IF |
LET counter$ += |
step$ |
``` |
Tokens that trigger this: `+ - * / % = <> < <= > >= AND OR += -= *= /= ,` |
> `MOD` is a function `MOD(a, b)`, not a binary operator it does not trigger continuation. Use `%` for the modulo operator. |
**Rule 2 open paren.** Anything inside an unmatched `(` keeps reading until the matching `)`: |
```basic |
LET dist$ = DISTANCE( |
x1$, y1$, |
x2$, y2$ |
) |
``` |
Both rules combine: |
```basic |
LET total$ = ( |
base$ + |
tax$ |
) |
``` |
**Trap for AI generators.** Do NOT emit a trailing `_`, `\`, `&`, or any other continuation marker they are not BazzBasic syntax and will produce parse errors. Just leave the operator at the end of the line, or open a paren. |
--- |
## Variables & Constants |
Variables and constants must be declared with LET before they can be used. |
BazzBasic variables are not typed, but work the same way as in JavaScript, for example. |
A variable needs the suffix $ which often is linked as STRING in traditional basic variants. |
Variables require suffix "$". Constants require suffix "#". |
The suffix does not define data type only "#" indicates immutability. |
```basic |
LET a$ ' Declare variable without value |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.