Liberty BASIC - limited version Release 0.9a Copyright 1992 Shoptalk Systems Liberty BASIC is a personal BASIC programming system for MS Windows 3.0 requiring a 286 (4 Meg RAM recommended for Standard Mode operation), or a 386, 486 or better (586?) and 3 Megabytes of RAM or more. When Microsoft introduced Windows 3.0, it didn't come with any programming facility, so we created Liberty BASIC to be for Windows what GWBASIC and QBASIC are for MS-DOS. Liberty BASIC is written using Digitalk's Smalltalk/V Windows programming environment, so it inherits a vast library of functionality that is as yet unused. This means that Liberty BASIC will grow to be much more powerful in future releases while growing only slightly in size. Liberty BASIC is a runtime environment, meaning that it does not create standalone executables (standalone .exe generation is an open possibility). Your code is parsed before runtime into precompiled Smalltalk contexts, which are then run. This means you must wait for the compile, but it speeds up execution. PLEASE call or write if you have any suggestions for features you would like to see in Liberty BASIC! We really need lots of feedback if Liberty BASIC is to become the product that _you_ want it to be. To find out more write or call: Shoptalk Systems P.O. Box 837 Marblehead, MA 01945-0837 508-872-5315 Or contact Carl Gundel on Compuserve at 71231, 1532 Support may be additionally found at: The Open Window BBS, in Beverly Massachusetts. Sysop Mike Riley. A Windows, OS/2, and CASE oriented BBS. Free access! The Open Window BBS has a message and file section exclusively for the support of Liberty BASIC and its users. Two lines are available: 508-927-7224 & 508-927-3459 Distribution Policy: Liberty BASIC is Shareware, and it may be copied and freely distributed providing the following list of files is distributed together and unmodified. Shoptalk Systems forbids the redistribution of Liberty BASIC for profit. A small fee may be levied for distribution costs, but not for the software itself. Liberty BASIC Release 0.9a is a subset of the commercial product. Our hope is that you will like this limited release enough to register. If you find it useful we ask you to please register your copy. $30 will get you the most recent version but without a printed manual (manual will be on a disk file). $49.95 you will get you the most recent version with a printed manual, technical support, and upgrades will be made available for a small fee. Inexpensive site licenses are available (educators take note). Releases 0.1 and 0.2 were very limited. Release 0.9 and this 0.9a release will give you a taste of the commercial version, which is continually being extended. Registered users will enjoy the benefits of a very powerful Windows programming tool. This is a list of files distributed with this release of Liberty BASIC: liberty.exe liberty.txt - This file summary.txt - Summary of commands & functions, hints, etc register.txt - Order form v09a.txt vwabort.dll vwbas11.dll vwdlgs.dll vwfloat.dll vwfont.dll vwsignon.dll vwvm.dll ascii.bas blank.bas brnchtst.bas buttons.bas circles.bas clock.bas customer.bas exponent.bas factoril.bas for_next.bas getchar.bas grapher.bas graphics.bas invoice.bas mandala.bas open.bas power.bas profile.bas read.bas sieve.bas strtest.bas test.bas turtle.bas turtle2.bas exp.bas install.bat upgrade.bat grapher.abc trio.abc AN IMPORTANT NOTE: ------------------------------------------------------------------------ If you received Liberty BASIC as two files, they should be called LBAS09P1.ZIP and LB09AP2.ZIP. If you received only one file, it should be called LB09A.ZIP. The contents of the first two zip files are identical to the contents of the third. The reason why the split files are available is to make downloading from a BBS possible when one only has a slow modem and limited access time. So it is then possible to download LBAS09P1.ZIP one day, and then LB09AP2.ZIP the next. If you only have LBAS09P1.ZIP, then you couldn't possibly be reading this file, since it is contained in LB09AP2.ZIP. But if you are reading this now and only have LB09AP2.ZIP, then you will need LBAS09P1.ZIP (contact whoever you got LB09AP2.ZIP from). In this release 0.9a there are some enhancements: ------------------------------------------------------------------------ A bug causing numeric constants between 0 and -1 to be accidentally translated as positive has been corrected ; Compile error messages are more helpful now, and the compiler will highlight the errant line in the source editor ; An on-line reference facility has been added as selections under the Help pull down menu of the file browser. If instruction is needed for a particular command, simply select that command in the source (double clicking on the word does the trick), then pull down Help and select Command Reference ; Graphics operations are more efficient (faster). Additionally a circle command has been added for drawing circles (see circles.bas) ; Faster compilation ; NOTE: In the file LIBERTY.TXT (this file) in the 0.9 release, the text for the TRACE command inaccurately stated that the three levels of TRACE worked thus: 0 - run full speed, 1 - animated trace, 2 - single step In actuality, the reverse is true. 0 single steps, 1 animates, and 2 runs full speed. Release 0.9 Notes: ------------------------------------------------------------------------ Some bugs in the parser have been fixed ; Multiple windows are supported, buttons can be added where desired. A button can cause execution to be transferred to a unique branch label (event driven style) or it can return a string like an INPUT statement (procedural style). Any window can be opened as: a graphics window with line and turtle color graphics ; a text window (for output or input) with font control ; a spreadsheet (controllable via BASIC statements) ; Confirmation and prompter style dialog boxes are supported ; The debugger has been improved with a variable watch window ; BASIC code can now be compiled and run from the start-up browser without first opening a BASIC source editor window ; Many more statements and functions are included (see summary.txt) ; More sample programs are included ; Release 0.2 Notes: -------------------------------------------------------------------------- IF/THEN/ELSE now supported. For example, the following is valid: if mid$(a$,index,1) = "." then print "." else print mid$(a$,index,1); The compiler is not case sensitive any longer. Reserved words may be in either upper or lower case. It is case sensitive in the sense that variable names that are the same but with different capitalization are considered unique. NOTE: VARIABLE NAMES MAY NOT START WITH STATEMENT OR FUNCTION NAMES. The simple continuous trace debugger in version 0.1 has been replaced by a 3 stage pushbutton debugger permitting single step, continuous trace, and no trace (run full speed). You can move from one mode to the other at will. A variable watch window is not available yet. In version 0.1 you needed to recompile every time you wanted to run a program. Now all that is needed is to bring up the pane menu for the window the program is running in and select the Restart option. This can be done at any time (not just at the end of a program run) and will work in Run or Debug mode. The ^ arithmetic operator is now supported. The remaining operators are: + - * / AND OR NOTE: AND & OR ARE ONLY USEFUL IN IF/THEN/ELSE STATEMENTS FOR THE PURPOSE OF DETERMINING LOGICAL CONDITIONS. FOR EXAMPLE: if a > b and matchFlag = 1 then gosub [match] is acceptable let result = -1 and latch is not acceptable Version 0.1 was only able to represent negative numbers with an expression (0-n). Version 0.2 now supports negative numbers in expressions. For example: In version 0.1 - print rate * (term + (0 - 5)) In version 0.2 - print rate * (term + -5) STOP and END commands are now supported. RND(1) is now supported. RND(0) is not. The random sequence generator is crude, but it works for now. Subsequent releases of Liberty BASIC will have improved 'randomness'. For now, let's just say that RND(1) provides 'arbitrary' number generation. STR() was changed to STR$(), which is the proper MBASIC name for this function. TRACE 0, 1, or 2 is now supported. This allows control of the debugger trace mode to be controlled inside of the program being debugged. TRACE 0 no trace, run at full speed TRACE 1 trace continously TRACE 2 single step Release 0.1 notes: --------------------------------------------------------------------------- Highly MS-BASIC compatible (this does not mean Quick BASIC or Q-BASIC) ; Procedural programming model ; Line numbers are optional with descriptive alphanumeric labels permitted ; The following commands are supported: LET, PRINT, INPUT, GOTO, GOSUB/RETURN, FOR/NEXT, IF/THEN, OPEN/CLOSE, PRINT#, INPUT#, DIM, REM (or ') The following functions are supported: LEN(), MID$(), EOF(), INT(), INPUT$(), VAL(), STR() Strings and integers of virtually unlimited size are supported (certainly larger than most need), and if you have a math coprocessor, Liberty BASIC will automatically take advantage of it where advantageous. File operations for this release of Liberty BASIC are limited to sequential access only. Both single and double dimension, string and numeric arrays are permitted. Variable name size is not limited, and all characters are significant. One limitation of this release is that IF/THEN statements can only be used for branching. For example, IF count < 10 THEN 500 is valid, but IF count < 10 THEN PRINT "Count is less than 10" is not permitted. Unfortunately, IF count < 10 THEN GOSUB 500 is not permitted either. This limitation will not exist in the registered version. Additionally, the compiler is very case sensitive (again, this will be remedied in the registered release). All basic commands, function names, and other reserved words need to be typed as uppercase, but variable names can be any length, and any combination of upper and lowercase letters. Digits and the period character are permitted, so long as they are not used as the first character. This release compiles at runtime. The registered version will feature incremental compilation. UPGRADING FROM 0.1, 0.2, or 0.9: If this is a first time installation, skip to INSTALLATION: below. If this is an upgrade from a previous version of Liberty BASIC, read on. The batch file upgrade.bat is included for this procedure. To procede with the upgrade (assuming Liberty BASIC is already installed in C:\LIBERTY), type: upgrade c (hit return) The appropriate files will be moved over to c:\LIBERTY, and then they will be deleted from their original drive:\directory. If you unzipped this upgrade into C:\LIBERTY, then nothing will be copied or deleted. Once this done, the upgrade will be complete. INSTALLATION: If you are upgrading from a previous version of Liberty BASIC (0.1, 0.2, or 0.9) to this version (0.9a), then you want to upgrade, not install. Go back to the section above, UPGRADING FROM 0.1, 0.2, or 0.9. If you have ANY trouble getting this to run on your machine, PLEASE call us and we WILL do our best to help you. A simple batch file install.bat is included to make installation as simple as possible: Assuming that the software is to be installed on drive C:, type the following: install c (hit return) a subdirectory named c:\liberty will be created and the files will be copied over (unless they already are in c:\liberty, in which case the installation simply ends now). They will then be deleted from the directory they were in (except install.bat, which you can delete or move to \liberty yourself). Once the installation is completed, you will need to make Windows aware of Liberty BASIC. To add Liberty BASIC as a Windows program group: Load Windows 3.0 ; Pull down the File menu and select New ; Select Program Group and click on the OK button ; Type Liberty BASIC as the description and click on the OK button ; Again pull down the File menu and select New ; Click on the OK button to accept the default Program Item response ; Type Liberty BASIC as the description and click on the Browse button ; Double-click on [..] in the Directories list box ; Double-click on [liberty] in the Directories list box ; Double-click on liberty.exe in the Files list box ; Now click on the OK button the the Program Item Properties dialog box You may now resize the Liberty BASIC group window to your liking. To start Liberty BASIC, double-click on the torch icon. Liberty BASIC starts with a file browser window. It is arranged as four panes, three across the top, and one on the bottom like so: +--------------------------------------------------------------+ | - Liberty BASIC c:\liberty v ^ | +--------------------------------------------------------------+ | a [1] | [..] [2] | demo.bas [3] | | b | liberty | read.bas | | c | msdos | test.bas | | | | | | select drive here | select directory | select file here | | | here | | +--------------------------------------------------------------+ | [4] | | | | | | | | see BASIC source for file selected here | | | | | | | | | +--------------------------------------------------------------+ Select the drive to browse in pane [1], then select the directory (usually liberty) to browse in pane [2], then finally the file to browse in pane [3]. When the .BAS file is selected, its source will be displayed in pane [4]. To run the program, position the cursor inside of pane [3] and press the right hand mouse button and a menu will appear. Then select the item BASIC source editor, and a new window will open which will contain a copy of the source for the selected file. Then position the cursor inside of that pane and again press the right hand mouse button for another menu. There are two options available, Run and Debug. Run compiles and runs the program, and Debug provides the additional benefit of a 3 level source level debugger with optional watch window (v 0.9 let's you do this in pane 4 without opening a seperate BASIC source editor). If you want help, you can get this on-line by pulling down the Help menu and selecting either Liberty BASIC Notes, or Command Reference. If you select a word in the source editor and then select help, the system will try to find that word or command in the text. HINT for 286 users with only 3 megabytes of RAM: --------------------------------------------------- 3 megabytes RAM is very tight for Liberty BASIC when running in Standard Mode. If low memory errors make Liberty BASIC unusable, try to free up as much extended memory as possible. If all else fails, try this: Run Windows ; Run Liberty BASIC ; Exit Liberty BASIC ; Run Liberty BASIC again As strange a ritual as this may seem, it does something to the way Liberty BASIC manages its memory, making those low memory errors much less trouble. We cannot guarantee that this trick will work on your system. Here's what you get with your registration fee of $30 or $50: Liberty BASIC 1.x (you will always get the most recent version) with: Graphics commands for filled polygons, circles, ellipses, pie slices ; Segmented graphics, which let you treat each drawn item as an object which can be individually manipulated ; The ability to add pull down menus to your program windows ; A more powerful spreadsheet widget ; Random access file capability (0.9a is limited to sequential); More string, math, and other functions and commands. If you send $30, you get a manual-on-a-disk and tech support. If you send $50, you get a printed spiral bound manual, tech support, and $15 upgrades to the next version. Here is some other stuff in the works: Incremental compilation ; More and more powerful statements and functions ; Full cut and paste via Windows Clipboard ; Standalone application generation ; More window and widget types... PLEASE call or write if you have any suggestions for features you would like to see in Liberty BASIC! We really need lots of feedback if Liberty BASIC is to become the product that _you_ want it to be. To find out more write or call: Shoptalk Systems P.O. Box 837 Marblehead, MA 01945-0837 508-872-5315 Or contact Carl Gundel on Compuserve at 71231, 1532