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. 
  • 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
  1. Twenty six (32-bit signed) integer-only variables (A..Z)
  2. Single array (@())
  3. REM, LET and STOP
  4. FOR loops with optional STEP clause
  5. IF statement, with six compare operators (=, #, <, >, <=, >=)
  6. GOSUB and RETURN
  7. INPUT and PRINT
  8. Two functions, ABS(x) and RND(x)
  9. Expressions involving liternal numbers, variables, the array,
  10. functions and parenthesis to alter evaluation order
  11. DRAW command for graphics output
  12. WAIT command for introducing delays or waiting for key-press events in the graphics window
  13. TRACE command for showing command execution sequence
  14. RENUMBER command with undo feature
  1. ELSE which is used together with IF. Multiple ELSE IF statements are supported
  2. WHILE/WEND loops which continue to execute while an arbitrary test in WHILE is true
  3. REPEAT/UNTIL loops which continue to execute while an arbitrary test with UNTIL is false
  4. BREAK for early exit from WHILE/WEND, REPEAT/UNTIL and FOR/NEXT loops
  5. CONTINUE for immediate re-evaluation of WHILE/WEND, REPEAT/UNTIL or FOR/NEXT loops
Support for Graphics
  1. Open a new drawing window
  2. Draw single pixel points
  3. Draw lines of varying thickness
  4. Draw filled (solid) or outline circles
  5. Draw filled or outline rectangles
  6. Draw filled or outline triangles
  7. Draw text
  8. Clear the graphics window
  9. Close the graphics window

 

Read 10411 times Last modified on Sunday, 27 January 2013 23:26

Leave a comment

Back to Top