Welcome to twinBASIC

twinBASIC is a new BASIC language and development environment aiming for 100% backward compatibility with VB6 and VBA, while adding modern language features — generics, native Interface and CoClass declarations, attributes, and a package system. The compiler and IDE are under active development and currently in beta; the FAQ covers the project’s status, authorship, and what is and isn’t implemented today, and downloads live on the Releases page of the main GitHub repository.

New to twinBASIC?

Start with the FAQ for orientation — what twinBASIC is, where it stands today, and what runs on it — then the Features overview for a tour of everything the language adds on top of VBx. The Tutorials section below has step-by-step guides; the Arrays tutorial assumes no prior twinBASIC experience and is a reasonable first read.

Coming from VBA or VB6?

Most existing VB6 / VBA code compiles unchanged. The Features overview catalogues every addition — new data types (LongLong, LongPtr, Decimal), native Interface and CoClass definitions, Implements Via and Inherits, generics, method overloading, type inference, attribute syntax, and more.

Looking up a keyword, function, or operator?

The reference section is split into language constructs (the things the compiler parses) and runtime members (functions, properties, types, classes shipped in the built-in packages):

  • Categorical list — statements, procedures, and functions grouped by purpose (compiler control, declarations, control flow, file I/O, …)
  • Statements — alphabetical index of every language statement
  • Procedures and Functions — alphabetical index of every callable runtime member
  • Operators — arithmetic, comparison, logical, bitwise, and twinBASIC’s added operators
  • Compiler Constants — the #If symbols recognised by the compiler
  • Attributes[Documentation(...)], [COMCreatable(...)], and the rest of the attribute syntax
  • Controls — the standard UI controls (CheckBox, TextBox, CommandButton, …) grouped by purpose
  • Glossary — technical terms used across the docs

Built-in packages

A package groups related code under one namespace and is referenced from a project as a single dependency. The Packages page lists every built-in package with a one-line description; the headings below group them by what they are for.

Default packages — referenced in every project automatically:

Additional GUI — controls beyond the VB package:

Web embedding — host a browser engine inside a form:

  • WebView2 — the Microsoft Edge runtime
  • CEF — the Chromium Embedded Framework (BETA), with a choice of three Chromium runtimes

Windows integration — thin wrappers over OS facilities:

  • WinServicesLib — run a twinBASIC EXE as one or more Windows services
  • WinEventLogLib — write Windows Event Log entries, with compile-time message-table generation
  • WinNamedPipesLib — IOCP-based asynchronous named-pipe server and client

Tooling:

  • Assert — assertion functions for unit tests, in three modules sharing the same fifteen-member API at different strictness levels
  • tbIDE — the addin SDK for the twinBASIC IDE itself

Tutorials

  • Arrays — fixed and dynamic arrays, Dim, ReDim, multi-dimensional shapes
  • CustomControls — building owner-drawn controls with the Waynes… framework
  • WebView2 — embedding the Edge runtime: hosting local assets, JavaScript interop, driving Monaco
  • CEF — embedding Chromium: building a browser shell, hosting local assets, JavaScript interop, driving Monaco

The twinBASIC IDE

The IDE section documents the editor, project explorer, debugging panes (call stack, watches, diagnostics, debug console), the tbForm and tbReport designers, and the per-feature side panes. To install third-party addins, see Add Ins; to author your own, the tbIDE package is the addin SDK.

Community and external resources

Contributing to the documentation

These docs are open source. See Documentation Development for the build and preview workflow plus the contribution conventions.