What is 123 basic? - metzzo/123-basic GitHub Wiki

123 basic is a basic compiler that compiles GLBasic code into HTML5 + JavaScript code. This output can be executed in every HTML5 ready browser on different devices (tablets, laptops, desktops, smartphones, ...).

The compiler itself is very advanced and is theoretically able to compile ever GLBasic code into valid HTML5 + JavaScript code. For example: 123 basic is self hosting: That means the compiler can compile itself into HTML5 + JavaScript.

Language Features

123 basic supports every GLBasic language feature:

  • Flow control (IF, SELECT, WHILE, FOR, FOREACH, REPEAT, BREAK, CONTINUE, GOTO, ...)
  • Exceptions (TRY - CATCH)
  • Variables (GLOBAL, LOCAL, STATIC, CONSTANT)
  • Multi dimensional data types
  • Pointer/References (ALIAS, BYREF)
  • Simple OOP (TYPE)
  • Functions (FUNCTION, SUB)
  • Function pointer (PROTOTYPE)
  • Callback function (CALLBACK)
  • Data blocks (DATA)

123 basic can be easily extended to support other targets and/or output languages. An experimental C# compiler is already built.

Framework Features

  • Advanced 2D sprite and animation drawing
  • Bitmap fonts
  • Sound / music support
  • Native feeling file stream support
  • Wide range of input devices (Mouse, Keyboard, Joystick)
  • Math, String, INI, Array support