Bugs and Gotchas

From Liberty BASIC Family
Jump to navigation Jump to search

by The Community


This is a list of known bugs, quirks and gotchas that folks new to Liberty BASIC have discovered. Each is listed beside the command it is associated with. A bug is something Liberty is getting wrong, a gotcha is something the programmer should not be doing and the rest is for info, as each BASIC language has little quirks of its own.

If you are new to Liberty BASIC and you have not yet found or read the Fast FAQ then please do so. The is your other search-able font of knowledge about all things Liberty.

If you are still perplexed then there are many people to chat to over on the Community board.

The command Description of Bug, Gotcha or Info Link to more info
- Unary minus is not supported, use 0-x Info
= Comparing two floats x.x y.y is problematic Gotcha
!insert Texteditor !insert command requires a locally scoped string Bug
% If this appears in front of a using() number its too big to fit Info
* A missing * in a maths statement is not caught, always insert * Info
, Missing , are sometimes not reported, check , are inserted Info
Beep Beep is not supported by modern BIOS, use Playwave instead Info
Box graphics Box draws one pixel short Info
Branch labels A [Branch Label] should not head up another [Branch Label] Bug
Button Button anchor values result in misplaced buttons Bug
Calldll Calldll return types USHORT and WORD are broken Bug
Close Random file's close command cannot use a Handle$ variable Bug
Data If you precede the data statement with line numbers it will fail Bug
Error message Attempted to kill non-existant file Gotcha
Error message Stack Overflow Gotcha
Error message Collection is empty Gotcha
Error message Argument must be a collection Gotcha
Error message Index (n) is outside collection bounds Gotcha
Error message Invalid Branch Label [xyz] Gotcha
Error message Float invalid op Info
Error message System Primitive Failed Gotcha
Error message File is literally invisible Gotcha
Error message Error Opening file Gotcha
Error message File System Access Denied Gotcha
Error message Problem creating file Gotcha
Error message OS Error cannot find file Gotcha
Error message String can't hold string Info
Error message A non-continuable protection violation has occurred Gotcha
Error message IsEmpty Gotcha
Field Random file's field command cannot use a Handle$ variable Bug
File Association Associating liberty.exe to .bas files needs manual fix on upgrade Info
For Next Incorrectly allows a string variable as a loop counter Bug
For Next Do not use a global variable as a loop counter Info
For Next Don't jump out a for next loop, leave using exit for Gotcha
For Next A STRUCT variable cannot be used as a loop counter Info
Function Arrays are global by default and available inside functions Info
Function Global variables need not be passed to functions Info
Get Random file's get command cannot use a Handle$ variable Bug
Handle$ Handle$ variables do not work with RAF files Bug
Horizscrollbar Large graphics need special preparation Bug
IDE IDE-editor - Undo feature does not work + some quirks Bug
Inkey$ The help file reference listing Virtual Key Codes is erroneous Info
Input var$;val Input cannot use a var$ as a prompt as per the help file Bug
Inputcsv Does not deal with embeded quotes correctly Bug
Line graphics Line draws one pixel short Info
Listbox Changes to font size after creation breaks scroll range Bug
lof() Lof() function reports incorrect files size for files > 4Gb Info
Mainwin Mainwin permanently alters width, reset to 80 using preferences Info
Mid$() Mid$() reads a string fragment, it cannot assign a string fragment Info
middleButtonMove middleButtonMove event is broken Bug
Pie graphics Pie and Piefilled drawing distorted Bug
Piefilled graphics Pie and Piefilled drawing distorted Bug
Printerdialog Printerdialog is broken an API alternative is available Bug
Prompt If you use prompt when a timer is running Liberty will ignore it Bug
Put Random file's put command cannot use a Handle$ variable Bug
Put Attempting to write to record 0 erronously creates a 4Gb file Bug
Redim Redim acts on an existing array a(x,y) x,y cannot change Info
Rnd(0) Rnd(0) has a slight bias, improved routines are available Info
Sort Sort a(),r,c,col if r is less than c sorting breaks when col is >r Bug
Sort Sorting is not in ASCII order it is dictionary order but flawed Bug
STRUCT STRUCT keyword is case sensitive Info
STRUCT double STRUCT member of type double crashes if you assign and integer Bug
STRUCT Variable STRUCT variable cannot be used as a For loop counter Info
Sub Arrays are global by default and available inside Subs Info
Sub Global variables need not be passed to Subs Info
Texteditor The !insert command must use a locally scoped string Info
Texteditor The undo feature is broken Bug
Time$() Time$() arguments are case sensitive, lower case Info
Timer If you use prompt when a timer is running Liberty will ignore it Bug
Timer If a timer is set you must consider where the scope is when it fires Gotcha
Timer Timer events repeat, you must turn them off asap Tutorial needed
Timer Only a timer encased entirely within a sub will work Gotcha
Trapclose Trapclose is broken for windows of type text Bug
Using Using is accurate to 16 digits, beyond that is garbage Info
Using() If a % appears the number is too big to fit in the format Info
Vertscrollbar Large graphics need special preparation Bug
Virtual Key Code The help file reference listing Virtual Key Codes is erroneous Info
Window type Dialog Dialog windows may position incorrectly if DPI is not 96 Bug
Window type Text Trapclose is broken for windows of type text Bug