UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

CLOSE Syntax CLOSE [file.var] [ON ERROR statements] Description The UniBasic CLOSE command closes a dictionary or data file. Note: You can use the OPEN command to access an unlimited number of files in a single UniData process. However, the operating system could limit the number of files that can be opened across numerous processes and users. Parameters The following table describes each parameter of the syntax. Parameter Description 1-151 UniBasic Commands Reference file.var Specifies a dictionary or data file to close. If you do not specify file.var, the default file is closed. If no default file is open, the command has no effect. A default file is created by omitting the file variable in the OPEN statement. ON ERROR statements Specifies statements to execute if a fatal error occurs because the file is not open. If you do not specify the ON ERROR clause, the program terminates under fatal error conditions. CLOSE Parameters

Example In the following example, the program segment opens and closes the file INVENTORY: OPEN 'INVENTORY' TO INVENTORY.FILE ELSE STOP CLOSE INVENTORY.FILE Related Command UniBasic OPEN CLOSE 1-152

Example<br />

In the following example, the program segment opens and closes the file<br />

INVENTORY:<br />

OPEN 'INVENTORY' TO INVENTORY.FILE ELSE STOP<br />

CLOSE INVENTORY.FILE<br />

Related Command<br />

<strong>UniBasic</strong><br />

OPEN<br />

CLOSE 1-152

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!