# NOBUF

Updated: 10/14/2021, 2:20:00 PM
Created: 10/14/2021, 2:20:00 PM
Last Updated By: mikes
Read Time: 1 minute(s)

# Description

jBASE can buffer for sequential input and output operations. The NOBUF statement turns off this behavior and causes all writes to the file to be performed immediately. The NOBUF statement should be used in conjunction with a successful OPENSEQ statement and before any input or output is performed on the record.

It takes the general form:

NOBUF file.variable {THEN statements [ELSE statements] | ELSE statements}
1

If the NOBUF operation is successful, it executes the THEN statements otherwise, executes the ELSE statements. If file.variable is not a valid file descriptor then NOBUF statement fails and the program enters the debugger.

In the following example, if RECORD in DIRFILE can be opened, output buffering is turned off:

OPENSEQ 'DIRFILE', 'RECORD' TO DATA THEN NOBUF DATA
ELSE ABORT
1
2

Go back to jBASE BASIC

Go back to Programmers' Reference Guide