Est. 1994 Intermediate

Sax Basic

Sax Basic is an embeddable, Visual Basic-compatible scripting engine that let 1990s and 2000s Windows applications like SPSS and ER/Studio expose their object models to user-written macros

Created by Sax Software (Eugene, Oregon), building on BASIC interpreter technology from Tom Bennett of Polar Engineering and Consulting

Paradigm Procedural, event-driven scripting; largely source-compatible with Microsoft Visual Basic for Applications (VBA) and VBScript
Typing Dynamic by default (Variant-typed), with optional explicit variable declarations and a fixed set of BASIC data types (Integer, Long, Single, Double, Currency, String, Boolean, Object, Variant, etc.)
First Appeared Fall 1994, as the Sax Basic Engine, a Visual Basic Extension (VBX) add-in for Visual Basic developers
Latest Version Sax Basic Engine 6.x (versions as high as 6.1 and 6.4 reportedly circulated; Help documentation copyright 1993-2001, Polar Engineering and Consulting); Sax Software's own releases appear to have stopped some years before Polar Engineering and Consulting formally announced WinWrap Basic v10 as a fully compatible Sax Basic successor in March 2010

Sax Basic is an embeddable, royalty-licensed scripting engine that let independent software vendors bolt Visual Basic-style macro capability onto their own Windows applications without writing a language interpreter from scratch. Rather than being a general-purpose language a developer sat down to write standalone programs in, Sax Basic was infrastructure: a COM/ActiveX component that a host application - a statistics package, a data modeling tool, a terminal emulator - could embed to expose its own object model to end-user scripts. For roughly fifteen years spanning the mid-1990s to around 2010, it was one of the more common ways smaller Windows ISVs gave their customers “macros” that felt like VBA without licensing VBA itself.

History & Origins

Sax Basic traces back to work by Tom Bennett, who began writing a BASIC interpreter in C++ in 1991 through Polar Engineering and Consulting; that codebase would eventually also be sold directly by Polar as WinWrap Basic. In the fall of 1994, Sax Software - based in Eugene, Oregon - began marketing the Sax Basic Engine as a Visual Basic Extension (VBX), giving Visual Basic 3 developers a drop-in control for adding scripting to their own applications. In November 1995, Sax Software followed with OCX editions of the engine compatible with Visual Basic 4, covering both the outgoing 16-bit and the new 32-bit VB compilers.

The timing mattered: Microsoft’s own Visual Basic for Applications (VBA) was still primarily bundled with Microsoft Office and Microsoft’s developer tools, and was not yet broadly available for third-party ISVs to license and embed. Sax Basic filled that gap, offering a scripting language deliberately close to VB/VBA syntax so that end users familiar with Excel or Access macros could transfer their skills, while giving host applications a COM-based hook to plug in their own objects, methods, and events.

Sax Software’s help documentation - reused essentially unmodified for years afterward by licensee applications - carries a copyright notice reading “1993-2001, Polar Engineering and Consulting,” underscoring that Polar’s interpreter technology remained the engine underneath the Sax-branded product throughout its commercial life. As Sax Software’s own release cadence slowed over the 2000s, Polar Engineering’s own WinWrap Basic - built from the same lineage and kept source- and binary-compatible with Sax Basic scripts - became the de facto maintained successor that existing licensees migrated to; Polar formally announced WinWrap Basic version 10 as fully Sax Basic-compatible in March 2010.

Design Philosophy

Sax Basic’s guiding idea was compatibility over innovation: it aimed to be “close enough” to Visual Basic and VBA that developers and end users would not need to learn a new language, only a new set of host-specific objects. It supported the classic VB furniture - Sub/Function procedures, Dim declarations, If/Select Case branching, For/Do loops, user-defined Types, class modules, and a Variant default type - alongside a Begin Dialog/End Dialog block syntax for building simple modal dialog boxes directly in code, mirroring the dialog-editor output of early VB and WinWrap-family Basics.

Because it was meant to be embedded, Sax Basic put heavy emphasis on exposing a clean automation surface: host applications registered their own object models (documents, fields, records, UI elements) so that scripts could call CallByName, walk collections, and respond to host-raised events, all through the same COM plumbing that VBA itself used inside Office. This let very different products - a statistics package and a database modeling tool, for instance - offer scripting that felt familiar to the same pool of VB-literate power users.

Key Features

  • VBA/VBScript-like syntax - procedures, modules, class modules, Dim/ReDim, With blocks, and standard BASIC control flow, close enough to Visual Basic that existing VB code often ported with minimal changes.
  • COM/ActiveX automation - hosts exposed their own object models to scripts, and scripts could in turn drive other COM-visible applications, using the same Automation model as VBA.
  • Integrated development environment - a bundled Sax Basic Editor provided syntax highlighting, automatic indenting, an object browser, a dialog editor, and a run/debug environment with breakpoints, so host applications got a full script IDE “for free.”
  • Built-in dialog designer - the Begin Dialog/End Dialog syntax let scripts define simple modal UI without needing a separate visual form designer.
  • OEM embeddability - delivered first as a VBX and later as an OCX/COM control specifically so that ISVs could license and redistribute it inside their own products.

Evolution

Sax Basic’s own evolution was modest by design: because compatibility with VB/VBA was the point, the language’s syntax changed little across its lifetime. What did change was packaging and distribution - from the 16-bit VBX control of 1994, to 16-bit and 32-bit OCX/COM controls for VB4 in 1995, through further 32-bit-only OCX releases documented in help files through 2001. Sax Software’s own new-version output appears to have wound down at some point in the mid-to-late 2000s, and the ISVs who had embedded Sax Basic - including SPSS - either kept shipping the existing engine unchanged for backward compatibility with customers’ legacy scripts, or migrated to Polar Engineering’s actively maintained, compatible WinWrap Basic engine, which by 2010 was formally marketed as a drop-in upgrade path for “legacy” Sax Basic scripts and remains so today.

Current Relevance

Sax Basic itself is not under active development; Sax Software has not shipped a new version of the engine in many years, and its old VBX/OCX distribution model has long since been superseded by other embedding technologies. Where it survives, it is almost entirely in a legacy-compatibility role: applications such as ER/Studio Data Architect still ship a “SAX Basic Macro Editor” for scripts written years or decades ago, and IBM SPSS Statistics continued to bundle a Sax Basic-compatible scripting engine for backward compatibility with .sbs script files long after Python scripting became the recommended path for new automation. For developers who still need a Sax Basic-compatible embeddable interpreter, Polar Engineering and Consulting’s WinWrap Basic is marketed explicitly as the maintained, compatible successor.

Why It Matters

Sax Basic is a useful reminder that a lot of programming-language history is not about languages people wrote from scratch to sit down and use, but about scripting engines that vendors licensed to make their own products extensible. In an era before Microsoft made VBA broadly licensable to third parties, Sax Basic (and its WinWrap Basic sibling) gave a wave of Windows ISVs - from statistical software to database modeling tools to terminal emulators - a fast, familiar way to give end users macro power without building and maintaining a BASIC interpreter themselves. Its long afterlife inside products like SPSS and ER/Studio, where old .sbs and macro scripts kept running for years after the vendor stopped actively developing the engine, illustrates how embedded scripting languages can quietly outlive the companies that created them, sustained entirely by the backward-compatibility needs of the host applications built around them.

Timeline

1991
Tom Bennett begins writing a BASIC interpreter in C++, work that Polar Engineering and Consulting later markets as WinWrap Basic for Windows
1994
Sax Software begins marketing the Sax Basic Engine in the fall as a Visual Basic Extension (VBX), giving Visual Basic developers a way to add VB-like scripting to their own applications
1995
In November, Sax Software starts shipping OCX versions of the Sax Basic Engine for Visual Basic 4, supporting both the 16-bit and 32-bit VB compilers
1998
SPSS Inc. reportedly adopts the Sax Basic Engine as the scripting language for SPSS for Windows, embedding it starting around SPSS 8 (released 1998) and continuing through SPSS 9 and SPSS 10 to let users automate output and dialogs
2001
Sax Basic Help documentation is copyrighted through this year by Polar Engineering and Consulting, reflecting Polar's ongoing role in developing and supporting the underlying interpreter
2006
SPSS introduces a Python programmability extension in SPSS 14 that supersedes Sax Basic scripts for most new automation work, though SPSS continues to ship a Sax Basic-compatible engine for legacy scripts through SPSS 15 and beyond
2010
Polar Engineering and Consulting formally announces WinWrap Basic version 10 as delivering fully compatible support for legacy Sax Basic scripts, positioning it as the actively maintained upgrade path after Sax Software's own development activity had wound down

Notable Uses & Legacy

SPSS for Windows (SPSS Inc. / IBM)

Used the Sax Basic Engine as its built-in Script and macro language across SPSS 8 through roughly SPSS 15, letting analysts automate output formatting, pivot tables, and dialog boxes before Python scripting largely replaced it

ER/Studio Data Architect (Embarcadero / IDERA)

Ships a Sax Basic macro editor, interpreter, and debugger (accessible from the Tools menu) that exposes the data modeling tool's object model for custom automation scripts

AccuTerm (Zumasys)

Bundled the Sax Basic Engine as its terminal emulator's scripting and automation language; its help manuals reportedly still carry Sax Basic Help copyright notices even though current AccuTerm documentation markets the feature as VBA scripting

Language Influence

Influenced By

BASIC Visual Basic Visual Basic for Applications

Running Today

Run examples using the official Docker image:

docker pull
Last updated: