Paradox Lives Again

Your PAL scripts
still run.

Paradox for DOS ran businesses, clubs and households for decades. The software stopped; the data and the scripts didn't. pla is a new, open-source implementation of PAL and the Paradox table format that runs them unchanged on today's Windows, Mac and Linux — and in the browser below.

; CUSTMGR.SC — written in 1992, running today
WHILE True
   SHOWMENU
      "Browse": "Look through the customer table",
      "Report": "Sales by customer",
      "Quit":   "Leave the customer manager"
   TO choice
   SWITCH
      CASE choice = "Browse": BrowseCustomers()
      CASE choice = "Report": SalesReport()
      CASE choice = "Quit":   QUITLOOP
   ENDSWITCH
ENDWHILE

Viewing ABOUT table

Keep what you built. Lose the DOS box.

Somewhere there is a folder full of .SC scripts and .DB tables: a customer list, a record collection, the books for a club, thirty years of careful work. Paradox for DOS was the last program that could open it, and each new computer makes running it harder.

Paradox Lives Again doesn't emulate an old PC. It is a new implementation of the Paradox Application Language: a compiler and bytecode virtual machine written in Rust, with its own reader and writer for Paradox table files. Your scripts run as they are, your tables stay Paradox tables, and nothing is converted unless you ask.

Scripts > Play

Run PAL in your browser

This is the real engine compiled to WebAssembly. It starts with sample Paradox 4.x tables — or open your own Paradox folder and run your own scripts, including recorded keystroke macros like INSTANT.SC. Click the screen, then use the arrow keys, Enter, Esc and F2. Your files never leave your browser.

Your own Paradox folder Open the folder with the tables and scripts (or drop it here). It is read in this browser only — nothing is uploaded.

Scripts (click one to run it)

    Tables (click one to look inside)

      
            

      Viewing FEATURES table: Record 1 of 9

      What pla does

      FEATURESFeatureWhat it means for you
      1pla runRuns a PAL script full-screen with the original colours, menus and keys. Ctrl+C is Ctrl+Break.
      2Paradox tablesReads Paradox 3.0 through 7 tables; writes 3.5 and 4.x tables. The writer is tested against pxlib, an independent open-source Paradox library.
      3Query By ExampleQUERY … ENDQUERY with checkmarks, _example joins, calc sum, wildcards, Delete and changeto.
      4pla auditReads a whole folder of scripts and tells you which run as-is and exactly which lines need attention.
      5BackupsBefore a table is changed or deleted, the original goes to _pla_backup/ with a timestamp.
      6pla convertExports every table to CSV, JSON or SQL. sqlite3 paradox.sqlite < all-tables.sql and you're modern.
      7pla serveOpens your tables in a web browser, with a JSON API. Local-only and read-only unless you say otherwise.
      8PLA+ extensionsOptional new tricks for old scripts: LAMBDA, ROUTE web handlers, TOJSON(), TRIM(), REPLACE().
      9Safe by defaultScripts can only touch files in their data folder; RUN is off until you allow it.

      Ask > Compatibility

      What works today

      Targeting Paradox for DOS 3.5 and 4.x. Not sure about your scripts? Run pla audit on the folder, or paste one into the playground and press Check compatibility.

      AreaStatusNotes
      Language coreWorksVariables, dynamic scope, PROC / CLOSED / USEVARS, PRIVATE, IF, WHILE, FOR, SWITCH, SCAN, FOREACH, arrays, dynamic arrays, ERRORPROC, EXECUTE, PLAY
      FunctionsWorks130 built-in functions: strings, maths, dates, FORMAT, table and workspace functions, CSUM-style column statistics
      Screen & inputWorks?, ??, @, STYLE, PAINTCANVAS, TEXT, ACCEPT, SHOWMENU, SHOWPOPUP, SHOWPULLDOWN, SHOWARRAY, WAIT TABLE, GETCHAR
      Tables & editingWorksVIEW, EDIT, COEDIT, DO_IT!, CANCELEDIT, cursor keys, LOCATE, CREATE, COPY, RENAME, ADD, SORT, EMPTY, key violations
      Query By ExampleMostSelection, joins, summaries, Delete, Insert, changeto. Not yet: set queries and Find
      Recorded keystrokesCommon{View}, {Modify} {Edit}, {Tools} {Copy|Rename|Delete}, export/import and more. pla audit lists any it can't do
      Reports & formsBasicDefault columnar reports go to PRINTER.TXT; custom report and form designs are not read yet
      Libraries (.LIB)Via sourceCompiled libraries can't be read, but --proc-path loads the same procedures from the .SC files that built them
      Paradox 4 dialogs & eventsNot yetSHOWDIALOG, GETEVENT, WINDOW — the next big item on the roadmap
      Password-protected tablesNoRemove the password in Paradox first, or keep an unprotected copy

      Create > New

      Get started in three commands

      Download pla for Windows, Mac or Linux from the releases page, or build it with Rust:

      cargo install --git https://github.com/ebenke/paradox-lives-again pla

      Copy the Paradox folder (tables and scripts together) somewhere on the new computer. Then:

      # 1. Which scripts will run as they are?
      pla audit C:\Paradox\Data
      
      # 2. Run one, full-screen, just like Paradox
      pla run C:\Paradox\Data\MAINMENU.SC
      
      # 3. And any time you want the data out
      pla convert C:\Paradox\Data C:\Paradox\Export --to csv

      Scripts that point at old paths like C:\PDOX45\DATA\CUSTOMER still work: pla looks the file up in the data folder. Procedures from compiled libraries? Point --proc-path at the folder of .SC files that built them.

      Help > Questions

      Questions

      Will it change or damage my tables?

      Only when a script changes them, the same as Paradox would. Before any table is written or deleted for the first time in a session, the original files are copied to _pla_backup/ with a timestamp. Tables you only read are never touched, and an unchanged table is written back identical to the byte.

      Can I still open the tables in real Paradox afterwards?

      That's the goal. pla writes standard Paradox 3.5 / 4.x files and reuses each table's original header when its structure hasn't changed, and its writer is tested against pxlib, an independent open-source Paradox library. Keyed tables get a rebuilt primary index (.PX); if Paradox ever complains about it, TUTILITY rebuilds it. Secondary indexes (.X/.Y files) are moved to the backup folder when a table changes, because they'd be out of date. Real-Paradox reports are very welcome.

      Is this an emulator? Do I need DOSBox?

      No and no. pla is a new program that understands PAL itself. That's why it can run in a web browser, give clear error messages with line numbers, and export your data to modern formats.

      My script says READLIB. What now?

      Compiled .LIB files use an undocumented Borland format. Usually the .SC scripts that created the library are still around: run with --proc-path FOLDER and pla finds each procedure in its source automatically. pla audit lists every procedure a script needs that isn't defined anywhere.

      What about Paradox for Windows and ObjectPAL?

      Tables from every Paradox version can be read and exported. ObjectPAL, the event-driven language of Paradox for Windows, is a much larger language and isn't supported. This project starts with PAL for DOS.

      Does the browser playground upload my files?

      No. The playground runs entirely in your browser. Tables and scripts you open are read by the page and kept in memory. Tables your scripts change are listed under “Changed by your scripts” for you to download; nothing is written to your folder, and it's all gone when you close the tab.

      Do recorded macros (INSTANT.SC, BeginRecord scripts) work?

      Yes. Recorded scripts replay keystrokes into Paradox's menus and forms — Menu {Ask} {Customer} Check "Boston" Do_It! — and pla emulates the query, sort and create forms, field typing, Zoom and Ditto. pla audit points out any menu path that isn't emulated yet.