Now Reading
twinBASIC Welcome

twinBASIC Welcome

2023-05-10 00:50:14


twinBASIC is a contemporary BASIC compiler that goals to be absolutely appropriate with all present VB6 and VBA code. It is a work in progress mission. Options are being added and enhancements are being made every day. For this preliminary preview we’ve got disabled some options that aren’t but prepared for public publicity. There are some elements of the VB syntax that aren’t but supported. We’re working laborious behind the scenes to get the remaining elements of the syntax integrated, so please bear with us.

It is a business mission, although the 32-bit Home windows model of the mission will probably be out there fully freed from cost.  Builders that must construct 64-bit binaries will both must buy a licence or endure a 5-second twinBASIC splash display when their functions begin.



Present Preview State

This preview model of twinBASIC can compile standalone EXE functions, ActiveX DLLs and ActiveX Controls.

Many of the widespread VB language options are full, nonetheless there are a number of essential issues to notice. These points will probably be mounted within the weeks and months forward.

  • Error numbers and descriptions do not all the time match VB but
  • multi-threading only allowed via the debug console for now
  • vbWatchdog assist disabled
  • Webserver extension library disabled
  • The VBA.Interplay.* namespace is carried out however has little take a look at protection, so there could also be points
  • The VBA.Strings.* namespace is carried out however has little take a look at protection, so there could also be points

Please assessment our CURRENT ROADMAP for anticipated launch dates of particular person options.


Getting Assist

twinBASIC challenge monitoring is now reside at GitHub. We have been inundated with bug studies and have requests from many alternative sources. Going ahead, it might assist immensely should you may report bugs and publish characteristic requests over on the repository which is able to assist us higher preserve monitor and handle requests.

       twinBASIC – GitHub

       twinBASIC – GitHub Issues

You too can be part of us over on our Discord server to talk about something associated to the mission:

       twinBASIC DISCORD server

Alternatively, you may get in contact with the lead developer on twitter:

Set up

Download the twinBASIC IDE

The twinBASIC IDE doesn’t require any set up in your machine.  Simply obtain the newest ZIP file, extract it, and run the twinBASIC.exe file from the foundation folder.

Getting Began – Pattern 1 – HelloWorld!

Let’s dive in with a easy Howdy World mission.

Launch the twinBASIC IDE by opening the twinBASIC.exe file you downloaded earlier. Now choose the ‘Samples’ tab, and open the pattern known as ‘Pattern 1. HelloWorld’

Press F5 to run the startup process (Sub Major on this case), and you need to be introduced with the pattern message field:

To construct an EXE file out of your mission, first save the mission (File menu > Save Undertaking), then press the Construct button on the toolbar:

The EXE file will now be constructed, and it’s best to see the small print within the DEBUG CONSOLE panel:

Undertaking settings

The mission settings permit for altering normal mission settings and COM references.

Multi-threading assist

twinBASIC itself helps multi-threading, however earlier than we unleash this characteristic correctly to the world, we have to add some language syntax to assist the characteristic.

Within the meantime, you’ll be able to take a look at multi-threading capabilities from the debug console, by beginning an expression with the tilde character (~) to point that you simply wish to run the code on one other thread.


Compiled code emitted by twinBASIC Preview 1 is unoptimized native code. Despite the fact that the output code is unoptimized, it’s usually a lot quicker than VBA (or VB6’s p-code compilation), merely as a consequence of it being native machine code.

Work is already underway to combine LLVM into twinBASIC in order that we will seize a few of the superb advantages it gives for code technology.

Generated EXE and DLL information are usually very small with twinBASIC. Please be aware that generated EXEs and DLLs don’t require any runtime or redistributable parts! (until you reference third-party parts your self).

New compiler options

We’ve already coated most of the new language options out there in twinBASIC in our movies:

In case you missed them, let’s take a fast take a look at a few of the new options out there in twinBASIC…

Inline variable initialization

Return assertion

See Also

DeclareWide syntax

The DeclareWide key phrase turns off the implicit ANSI to Unicode conversions that often occur behind the scenes when Strings are used with the Declare assertion


Parameterized Constructors

Naturally, since COM would not assist parameterized constructors, solely the default constructor is uncovered through the generated COM sort library.

Do not be alarmed… twinBASIC nonetheless helps Class_Initialize() too!


Oh, and generic inference can be supported, so you’ll be able to simplify that…

Generics are supported for procedures, lessons and UDTs. Generics usually are not uncovered within the generated COM sort libraries, and so can solely be used internally through twinBASIC.

TOP TIP:    twinBASIC accepts literals in addition to varieties in generic specifiers!

Implements per-procedure assist

New datatypes

Block feedback (as seen in lots of C fashion languages)

… and far, far more!! Take a look at our movies!

New operators

Bit shifting >

Project operators

Quick-circuiting operators AndAlso, OrElse, If() operator

Particular symbols for referring to the category/module title and process title: CurrentComponentName CurrentProcedureName

Source Link

What's Your Reaction?
In Love
Not Sure
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top