=Bugs and Gotchas= //Author - 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 chagotcha is something the programmer should not be doing and the rest is for infoinfo, 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 [[http://lbpe.wikispaces.com/FastFAQ|Fast FAQ]] then please do so. The [[http://lbpe.wikispaces.com/home|LBPE]] is your other searchable font of knowledge about all things Liberty. If you are still perplexed then there are many peoplenew to chat to over onLiberty BASIC and you have not yet found or read the [[http://libertybasic.conforums.com/|Conforum]] board.[[lbpe/FastFAQ|Fast FAQ]] then please do so. The [[lbpe/home|LBPE]] is your other searchable font of knowledge about all things Liberty. ||If you are still perplexed then there are many people to chat to over on the [[http://libertybasic.conforums.com/|Conforum]] board. || The command || Description of Bug Gotcha or Info ||Link|| Link to more info || ||____________________||______________________________________________________||__________________|| || || || || || - || Unary minus is not supported, use 0-x || [[libertybasicbugs/Unary minus not supported|Info]] || || = || Comparing two floats x.x y.y is problematic || [[libertybasicbugs/Incorrect floating point value|Gotcha]] || || !insert || Texteditor !insert command requires a locally scoped string || [[libertybasicbugs/TEXTEDITOR !insert|Bug]] || || % || If this appears in front of a using() number its too big to fit || [[lbpe/FastFAQ#Fast%20FAQ:-Using():|Info]] || || * || A missing * in a maths statement is not caught, always insert * || [[libertybasicbugs/Missing * not caught in expressions|Info]] || || , || Missing , are sometimes not reported, check , are inserted || [[libertybasicbugs/Missing commas are not reported|Info]] || || Beep || Beep is not supported by modern BIOS, use Playwave instead || [[libertybasicbugs/BEEP|Info]] || || Box graphics || Box draws one pixel short || [[libertybasicbugs/Line and Box draw one pixel short|Info]] || || Branch labels || A [Branch Label] should not head up another [Branch Label] || [[libertybasicbugs/Branch Labels|Bug]] || || Button || Button anchor values result in misplaced buttons || [[libertybasicbugs/Button anchor misplacement|Bug]] || || Calldll || Calldll return types USHORT and WORD are broken || [[libertybasicbugs/CALLDLL return types 'ushort' and 'word' are broken|Bug]] || || Close || Random file's close command cannot use a Handle$ variable || [[libertybasicbugs/Handle variables do not work with RANDOM files|Bug]] || || Data || If you precede the data statement with line numbers it will fail || [[libertybasicbugs/DATA|Bug]] || || Error message || Attempted to kill non-existant file || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Attempted%20to%20kill%20non-existant%20file|Gotcha]] || || Error message || Stack Overflow || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Stack%20Overflow|Gotcha]] || || Error message || Collection is empty || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Collection%20is%20empty|Gotcha]] || || Error message || Argument must be a collection || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Argument%20must%20be%20a%20collection|Gotcha]] || || Error message || Index (n) is outside collection bounds || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Index%20(nnn)%20is%20outside%20collection%20bounds|Gotcha]] || || Error message || Invalid Branch Label [xyz] || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Invalid%20branch%20label%20%5Bxyz%5D|Gotcha]] || || Error message || Float invalid op || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Float%20invalid%20op|Info]] || || Error message || System Primitive Failed || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-System%20Primitive%20Failed|Gotcha]] || || Error message || File is literally invisible || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Open%20file,%20the%20file%20is%20literally%20invisible|Gotcha]] || || Error message || Error Opening file || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Open%20file%20gives%20Error%20Opening%20File|Gotcha]] || || Error message || File System Access Denied || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Open%20file%20gives%20File%20System%20Access%20Denied|Gotcha]] || || Error message || Problem creating file || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Creating%20an%20.exe%20gives%20Problem%20Creating%20File|Gotcha]] || || Error message || OS Error cannot find file || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Creating%20an%20.exe%20gives%20OS%20Error%20cannot%20find%20file|Gotcha]] || || Error message || String can't hold string || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-String%20can't%20hold%20string|Info]] || || Error message || A non-continuable protection violation has occurred || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-Protection%20violation|Gotcha]] || || Error message || IsEmpty || [[lbpe/FastFAQ#Fast%20FAQ:-Liberty%20Runtime%20Errors:-IsEmpty|Gotcha]] || || Field || Random file's field command cannot use a Handle$ variable || [[libertybasicbugs/Handle variables do not work with RANDOM files|Bug]] || || File Association || Associating liberty.exe to .bas files needs manual fix on upgrade || [[libertybasicbugs/File Association .bas|Info]] || || For Next || Incorrectly allows a string variable as a loop counter || [[libertybasicbugs/FOR-allows string index variable|Bug]] || || For Next || Do not use a global variable as a loop counter || [[libertybasicbugs/FOR-global loop counter|Info]] || || For Next || Don't jump out a for next loop, leave using exit for || [[libertybasicbugs/Jumping out of a nested FOR loop|Gotcha]] || || For Next || A STRUCT variable cannot be used as a loop counter || [[libertybasicbugs/Structure member cannot be used as FOR variable|Info]] || || Function || Arrays are global by default and available inside functions || [[libertybasicbugs/Arrays Not Passed to Subs|Info]] || || Function || Global variables need not be passed to functions || [[libertybasicbugs/FUNCTION with GLOBAL parameter|Info]] || || Get || Random file's get command cannot use a Handle$ variable || [[libertybasicbugs/Handle variables do not work with RANDOM files|Bug]] || || Handle$ || Handle$ variables do not work with RAF files || [[libertybasicbugs/Handle variables do not work with RANDOM files|Bug]] || || Horizscrollbar || Large graphics need special preparation || [[libertybasicbugs/Scrollbars-Graphics-Distorted|Bug]] || || IDE || IDE-editor - Undo feature does not work + some quirks || [[libertybasicbugs/Environment|Bug]] || || Inkey$ || The help file reference listing Virtual Key Codes is erroneous || [[libertybasicbugs/HELPFILE-virtual key codes|Info]] || || Input var$;val || Input cannot use a var$ as a prompt as per the help file || [[libertybasicbugs/INPUT-variable as prompt|Bug]] || || Inputcsv || Does not deal with embeded quotes correctly || [[libertybasicbugs/INPUTCSV does not accept embedded quotes|Bug]] || || Line graphics || Line draws one pixel short || [[libertybasicbugs/Line and Box draw one pixel short|Info]] || || Listbox || Changes to font size after creation breaks scroll range || [[libertybasicbugs/Listbox horizontal scroll range|Bug]] || || lof() || Lof() function reports incorrect files size for files > 4Gb || [[libertybasicbugs/lof() reports wrong file size for large files|Info]] || || Mainwin || Mainwin permanently alters width, reset to 80 using preferences || [[libertybasicbugs/MAINWIN changes preferences|Info]] || || Mid$() || Mid$() reads a string fragment, it cannot assign a string fragment || [[libertybasicbugs/MID-can not assign value|Info]] || || middleButtonMove || middleButtonMove event is broken || [[libertybasicbugs/middleButtonMove event|Bug]] || || Pie graphics || Pie and Piefilled drawing distorted || [[libertybasicbugs/Pie and Piefilled drawing distorted|Bug]] || || Piefilled graphics || Pie and Piefilled drawing distorted || [[libertybasicbugs/Pie and Piefilled drawing distorted|Bug]] || || Printerdialog || Printerdialog is broken an API alternative is available || [[libertybasicbugs/PRINTERDIALOG-broken for XP and higher|Bug]] || || Prompt || If you use prompt when a timer is running Liberty will crash || [[libertybasicbugs/Timer and Prompt conflict|Bug]] || || Put || Random file's put command cannot use a Handle$ variable || [[libertybasicbugs/Handle variables do not work with RANDOM files|Bug]] || || Put || Attempting to write to record 0 erronously creates a 4Gb file || [[libertybasicbugs/PUT – attempt to write record 0 writes 4Gb file|Bug]] || || Redim || Redim acts on an existing array a(x,y) x,y cannot change || [[libertybasicbugs/Redim fails to redimension an array|Info]] || || Rnd(0) || Rnd(0) has a slight bias, improved routines are available || [[libertybasicbugs/Improved RND() function|Info]] || || Sort || Sort a(),r,c,col if r is less than c sorting breaks when col is >r || [[libertybasicbugs/Sort|Bug]] || || Sort || Sorting is not in ASCII order it is dictionary order but flawed || [[libertybasicbugs/SORT-fails to provide dictionary order|Bug]] || || STRUCT || STRUCT keyword is case sensitive || [[libertybasicbugs/STRUCT-keyword is case sensitive|Info]] || || STRUCT double || STRUCT member of type double crashes if you assign and integer || [[libertybasicbugs/STRUCT-DOUBLE crashes then assigning integer|Bug]] || || STRUCT Variable || STRUCT variable cannot be used as a For loop counter || [[libertybasicbugs/Structure member cannot be used as FOR variable|Info]] || || Sub || Arrays are global by default and available inside Subs || [[libertybasicbugs/Arrays Not Passed to Subs|Info]] || || Sub || Global variables need not be passed to Subs || [[libertybasicbugs/FUNCTION with GLOBAL parameter|Info]] || || Texteditor || The !insert command must use a locally scoped string || [[libertybasicbugs/TEXTEDITOR !insert|Info]] || || Texteditor || The undo feature is broken || [[libertybasicbugs/TEXTEDITOR - Undo feature doesn't work|Bug]] || || Time$() || Time$() arguments are case sensitive, lower case || [[libertybasicbugs/TIME-arguments are case sensitive|Info]] || || Timer || If you use prompt when a timer is running Liberty will crash || [[libertybasicbugs/Timer and Prompt conflict|Bug]] || || Timer || If a timer is set you must consider where the scope is when it fires || [[libertybasicbugs/TIMER-sub as event handler|Gotcha]] || || Timer || Timer events repeat, you must turn them off asap || Tutorial needed || || Timer || Only a timer encased entirely within a sub will work || Tutorial needed || || Trapclose || Trapclose is broken for windows of type text || [[libertybasicbugs/TRAPCLOSE does not work correctly in text window|Bug]] || || Using || Using is accurate to 16 digits, beyond that is garbage || [[libertybasicbugs/USING loses accuracy after 16 digits|Info]] || || Using() || If a % appears the number is too big to fit in the format || [[lbpe/FastFAQ#Fast%20FAQ:-Using():|Info]] || || Vertscrollbar || Large graphics need special preparation || [[libertybasicbugs/Scrollbars-Graphics-Distorted|Bug]] || || Virtual Key Code || The help file reference listing Virtual Key Codes is erroneous || [[libertybasicbugs/HELPFILE-virtual key codes|Info]] || || Window type Dialog || Dialog windows may position incorrectly if DPI is not 96 || [[libertybasicbugs/DIALOG-wrong position|Bug]] || || Window type Text || Trapclose is broken for windows of type text || [[libertybasicbugs/TRAPCLOSE does not work correctly in text window|Bug]] || ---- [[toc|flat]]