• No results found

LANGUAGE REFERENCE 2-127

In document dBase IV Language Reference (Page 183-187)

DISPLAY Commands

LANGUAGE REFERENCE 2-127

EDIT

EDIT is a full-screen command you use to display or change the contents of a record in the active database file or view.

Syntax

EDIT [NOINIT] [NOFOLLOW] [NOAPPEND] [NOMENU] [NOEDIT]

[NODELETE] [NOCLEAR] record number [FIELDS field list scope [FOR condition [WHILE condition

Defaults

If you use EDIT without a scope, or without a FOR or WHILE clause, you can move through all records in the database file.

Using a scope, or a FOR or WHILE clause, disables the Go To menu and the F2 key for shifting to BROWSE.

Usage

EDIT and CHANGE are identical commands.

You can change from EDIT to BROWSE by pressing the F2 Data key. EDIT displays data according to the definitions set in a format file if one is active, or in a default vertical field arrangement if a format is not active.

BROWSE displays multiple records in a tabular format.

EDIT uses the standard full-screen cursor control keys. The arrow keys move the cursor within a record. PgUp backs up to the previous record. PgDn advances to the next record or to the next screen if the fields extend beyond one screen. To exit and save all changes, press Ctrl-End. Press Esc to exit and save changes to all but the current record. To EDIT a memo field, press Ctrl-Home when the cursor is positioned on the memo field name.

Unless you use the NOAPPEND option, EDIT allows you to append records to a database file if you move the cursor past the last record of the file. In this way, it works just like the full-screen APPEND command.

When called from BROWSE, EDIT respects all the BROWSE command line options except COMPRESS, FREEZE, LOCK, WIDTH, and WINDOW.

BROWSE also respects all EDIT command line options.

When the EDIT command is completed, you return to your point of origin:

the dot prompt or next line of a file.

2-128 COMMANDS

EDIT

Options

NOINIT allows the command line options that you used with a previous EDIT command to be used in the current EDIT. NOINIT instructs the EDIT command not to initialize the EDIT table, but to use the table from the most recent EDIT instead.

NOFOLLOW applies only to indexed data. If you specify NOFOLLOW, editing a key field in a record repositions the record to its new position in the index order; the record that then takes the old place becomes the current record on the screen. If you do not specify NOFOLLOW, the edited record is repositioned after the key is changed; the record following the

record becomes the current record on the screen.

NOAPPEND prevents you from adding records to the database file during the edit.

NOMENU prevents access to the EDIT menu bar.

NOEDIT prevents you from changing any data presented on screen. You can add records, however, if you move the cursor to the end of the file, and you can mark records for deletion with Ctrl-U.

NODELETE prevents you from deleting records during the edit with the Ctrl-U key.

NOCLEAR keeps the image on the screen after you exit the EDIT.

record number starts the edit on the specified record, but lets you move to other records in the file. You may also use the keyword RECORD, which is one of the options of scope If you use the scope

keyword RECORD, however, EDIT is limited to one record, and does not allow you to move to other records in the file. Because EDIT RECORD

record number limits the edit to the specified record, EDIT RECORD record number and EDIT record number are not identical.

Tips

If SET AUTOSAVE is OFF, the directory entry for the active database file may not reflect all new records until the file is closed. If SET AUTOSAVE is ON, the directory on disk is updated after each new record is added.

Special Cases

In a network environment, if you have neglected to lock a record with or LOCK() before making a change, dBASE IV attempts to lock the record and any related records as soon as you press a key that is not a navigation key.

REFERENCE

I

EDIT

See Also

BROWSE, CHANGE, CREATE/MODIFY QUERY/VIEW, MODIFY COMMAND, SET AUTOSAVE, SET DESIGN, SET FIELDS, SET FORMAT, SET LOCK, SET REFRESH, SET WINDOW OF MEMO

2-130 COMMANDS

EJECT

EJECT causes the printer to advance the paper to the top of the next page.

EJECT affects only the printer. Greater functionality is available in the EJECT PAGE command.

Syntax

EJECT

Usage

Unless you have set the _padvance system variable to

EJECT issues a form feed (ASCII code to the printer. If is EJECT issues line feeds (ASCII code 10) to position to the top of form.

For proper printer operation, you must initially set the paper to the top of the form. Refer to your printer manual for instructions.

EJECT resets and to zero.

Tips

In a program file, you may want to verify the printer is connected and on-line with before issuing an EJECT.

See Also

EJECT PAGE, ON PAGE, PRINT, PRINTSTATUSO, PROW(), SET PRINTER

Chapter 5, Memory includes a discussion _pcolno, and

I

In document dBase IV Language Reference (Page 183-187)