Bay Six Software Forum Index Bay Six Software
Beyond the Basics
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Porting MS-DOS BASIC code to LB More Info
The following list summarizes differences between Liberty BASIC and MS-DOS BASICs that would normally not cause a syntax error, but nonetheless have significant differences.

Jump to N O P R S T U V W

  • NEXT cannot accept more than one variable.
  • NOT
    • Becomes a function.
    • Returns a boolean value; not a bitwise negation.
    • Label or line number must be in scope; no global error handler.
    • Error trapping is not disabled by ON ERROR GOTO 0
    • (PB) ON ERROR RESUME NEXT is not implemented.
  • OPEN
    • Creates a #handle.
    • LEN= accepts a literal number only.
  • PEEK is not implemented.
    • USING becomes a function: USING(format$, num).
    • Format string accepts only pounds (#) and a point (.).
    • Repeated calls to USING may be necessary.
    • Commas have the same meaning as for PRINT.
  • PUT
    • Is not a graphics command.
    • Requires a record index.
    • Cannot be used with BINARY files.
  • RANDOMIZE accepts real numbers between 0.0 and 1.0.
  • READ
    • Cannot read directly into array elements
    • Also see DATA.

  • RESUME does not accept any parameters; always resumes at the place of the error.
  • RETURN does not accept any paramters; always returns to the statement after the GOSUB.
  • RMDIR becomes a function.
  • RND is always called with a single parameter.
  • RUN can execute any executable file, but not a .BAS; similar to SHELL.

  • SEEK is a statement only.
    • CASE a TO b is not supported.
    • CASE IS is not supported.
  • SGN is not supported.
  • STOP is a synonym for END.
  • STRING$ is not supported.
  • SUB requires using no parentheses.
    E.g. SUB MySub Testing$, One, Two, Three

  • TIME$
    • Becomes a function.
    • Cannot change a PC's clock.
  • USING$ (PB) becomes USING, but is more limited. See PRINT USING.
  • VAL cannot convert hex (e.g. &HFF) and octal (e.g. &337 or &O377) strings.
  • WAIT is not hardware/port related.

Have a question or comment about this article? Discuss it.

Powered by phpBB © 2001, 2005 phpBB Group