twinBASIC Update: April 30, 2023

Highlights include twinBASIC's annual DevCon Vienna appearance and fafalone's ucExplorer control running in 64-bit MS Access.

twinBASIC Update: April 30, 2023

On April 23, 2021, I helped Wayne Phillips introduce the world to twinBASIC at the Access DevCon Vienna conference.  I boldly predicted that twinBASIC (along with the Monaco editor) would replace VBA and its outdated development environment by 2025.  With that goal in mind, this weekly update is my attempt to keep the project fresh in the minds of the VBA development community.

Every Sunday, I will be providing updates on the status of the project, linking to new articles discussing twinBASIC, and generally trying to increase engagement with the project.  If you come across items that should be included here, tweet me @NoLongerSet or email me at mike at nolongerset dot com.

Here are some links to get involved with the project:


As Expected, Another Quiet Week

As a reminder, on April 23, Wayne announced that he needed to take a brief break on twinBASIC to attend to his actual full-time job (still hard to imagine twinBASIC being a "side" project, though in reality I think it's more of a second full-time job):

Just a quick update my friends: it looks like this coming week will be the last "catch up" week, and then I'll be able to focus back onto twinBASIC.  Normal service will resume in May :). Thanks for bearing with me.

Around the Web

twinBASIC Makes its Annual DevCon Vienna Appearance

On Thursday, April 27, I gave my third talk in as many years on twinBASIC at DevCon Vienna, the largest English-speaking Microsoft Access conference in the world.  A brief summary of the talk is available as part of my Day One conference recap.  I plan to write a more in-depth article on the talk in the near future.

ucExplorer Running in 64-bit MS Access

fafalone's Windows Explorer-inspired ActiveX control–ucExplorer–is now working in 64-bit Microsoft Access.  

Here's fafalone in Discord:

Well this is exciting, ucExplorer working well in 64bit MS Access. Looks like I need to correct a likely dpi-related sizing bug making the scroll bars not show, but the commands and selection change event (and passing the selected paths) are all working.

This is the current version in the GitHub, if anyone wanted to play around with it:

For the past few weeks, there has been an extended conversation taking place in GitHub around what support twinBASIC should have–if any–for allowing the use of the Return keyword in Subs that do not contain a GoSub.  As a reminder, twinBASIC includes support for the use of Return in a Function to return a value to the calling code, rather than needing to rely on the awkward VBx convention of assigning a value to a variable with the same name as the function.

Ben Clothier first proposed this change back on October 20, 2021:

Describe the bug
Trying to Return from a Sub raises a "internal error"

To Reproduce
Create the code:

Public Sub Duh()
End Sub

It will highlight Return as an error.

Expected behavior
No error. It should be legal to return. Had I put in something to return (e.g. Return 1 or Return "foo"), then it's appropriate to show an error since it's a Sub.

BTW, I prefer this over Exit Sub because this avoids the need to change the code should it change from Sub to Function (or vice versa).

Last week, Ben proposed a slightly modified syntax:

Private Sub Foo()
  Return Default
End Sub

Private Function Bar() As Long
  Return Default ' Returns 0
End Function

Private Function Fizz() As String
  Return Default 'Returns vbNullString
End Function

Private Function Buzz() As Variant
  Return Default 'Returns vbEmpty
End Function

As the tentative July 3rd release date for v1.0 quickly approaches, the time to add these sorts of language design changes without incurring significant cost is coming to a close.  If you have thoughts on the topic, be sure to drop by the Github issue and make your case.


Here are the updates from the past week.  You can also find this information by visiting the GitHub twinBASIC Releases page.

Releases · WaynePhillipsEA/twinbasic
Contribute to WaynePhillipsEA/twinbasic development by creating an account on GitHub.

No changes this week.

All original code samples by Mike Wolfe are licensed under CC BY 4.0