Sunday, 27 January 2013 22:19
TinyBASIC for Raspberry Pi
TinyBASIC is a simple BASIC interpreter which allow beginners to easily get into programming
Installing
You need to install libsdl-gfx1.2-4 package before install TinyBASIC.
You need to install libsdl-gfx1.2-4 package before install TinyBASIC.
- SSH to Raspberry Pi and execute command below:
sudo apt-get install libsdl-gfx1.2-4 |
- Download TinyBASIC deb file and save it to any location of computer
- Transfer the downloaded deb file from computer to /tmp folder of Raspberry Pi using WinSCP
- Execute command below to start install TinyBasic
sudo dpkg -i /tmp/tinybasic_2.1-1_armhf.deb |
Create a desktop shortcut
Enter command below
cp /usr/share/applications/tinybasic*.desktop ~/Desktop |
Supported command for TinyBASIC
- Twenty six (32-bit signed) integer-only variables (A..Z)
- Single array (@())
- REM, LET and STOP
- FOR loops with optional STEP clause
- IF statement, with six compare operators (=, #, <, >, <=, >=)
- GOSUB and RETURN
- INPUT and PRINT
- Two functions, ABS(x) and RND(x)
- Expressions involving liternal numbers, variables, the array,
- functions and parenthesis to alter evaluation order
- DRAW command for graphics output
- WAIT command for introducing delays or waiting for key-press events in the graphics window
- TRACE command for showing command execution sequence
- RENUMBER command with undo feature
- ELSE which is used together with IF. Multiple ELSE IF statements are supported
- WHILE/WEND loops which continue to execute while an arbitrary test in WHILE is true
- REPEAT/UNTIL loops which continue to execute while an arbitrary test with UNTIL is false
- BREAK for early exit from WHILE/WEND, REPEAT/UNTIL and FOR/NEXT loops
- CONTINUE for immediate re-evaluation of WHILE/WEND, REPEAT/UNTIL or FOR/NEXT loops
Support for Graphics
- Open a new drawing window
- Draw single pixel points
- Draw lines of varying thickness
- Draw filled (solid) or outline circles
- Draw filled or outline rectangles
- Draw filled or outline triangles
- Draw text
- Clear the graphics window
- Close the graphics window
Published in
Blog
Tagged under