Saturday, April 27

Additional Commands

LOAD Command
The LOAD command is used to load a file from A diskette or hard disk into the memory.
Syntax
LOAD file name (,r)
Where,
file name : The name of file to be loaded.
r :   This option runs the program.
Points to remember

  • If the extension is omitted while writing the file name , the file having the same name with extension .BAS will be loaded.
  • LOAD command closes all open files and deletes all variable currently residing in memory before it loads the specified file.
  • When r option is used with LOAD, the program runs automatically after it is loaded, and all open data files are kept open.
Example 24

LOAD 'NUMBER"  (press enter key)
It loads the file NUMBER.BAS from the current directory of default drive. 
Screen output
LOAD : A : \ NUMBER" (press enter key)
It loads the file NUMBER .BAS from A : drive.
LOAD "A : \ GWBASIC \NUMBER" (press enter key)
It loads the file NUMBER.BAS from GWBASIC directory of A : drive.

No comments:

Post a Comment