Liberty BASIC Help Online |
Sending Commands
New to Liberty BASIC 3: it is no longer necessary to use the PRINT statement when issuing commands to a window or control. The word "print" is optional, as is the comma after the window or control handle. If these are omitted, Liberty BASIC adds them in the compiling process.
The PRINT statement may only be omitted when sending commands to windows and controls. It cannot be omitted when PRINTing to files or other devices.
Here are some examples of sending commands to a window.
The old way:
open "My Text Window" for text as #txtWin
print #txtWin, "The fox jumped over the dog."
print #txtWin, "!trapclose [quit]";
wait
[quit]
close #txtWin
end
The following version of the code above functions identically, and requires less typing:
open "My Text Window" for text as #txtWin
#txtWin "The fox jumped over the dog."
#txtWin "!trapclose [quit]";
wait
[quit]
close #txtWin
end
Copyright (C) 2003 Shoptalk Systems
Liberty BASIC - http://www.libertybasic.com/