VERIFY

From C64-Wiki
Jump to navigationJump to search
BASIC keyword
Keyword: VERIFY
Abbreviation: V Shift+E
Type: Command
Token code: -/$-
Handling routine
in BASIC ROM:
-–-
$-–-
List of all BASIC keywords


Remark: This article describes the BASIC command VERIFY in BASIC V2 of the Commodore 64.

Type: Command
General Programming-Syntax: VERIFY ["<filename>"] [,<device number>]

The BASIC command VERIFY compares files on a storage medium with the data in memory (RAM) after they have been written with the BASIC command SAVE. This command can used directly or in programs.

A number can be used to indicate the storage device:

  • datasette (device number 1)
  • disk drives (device numbers 8-15, optional first diskdrive 8, second diskdrive 9, etc.)

If a number is not used the computer defaults to the first device: the datasette.

The VERIFY command can also be used with the the datasette to position the tape at the end of the data being verified. Using this method, it's possible to ensure that new data is written after the existing data on the tape.

For comparing files on disks, it is important to use the filename, which can contain wildcards like * and ?.

During the data compare the BASIC message "VERIFYING" is displayed. If the data in RAM fails to match saved data the BASIC error message "?VERIFY ERROR" is displayed.

Examples[edit | edit source]

VERIFY 
(compare the first program file on datasette)

VERIFY "FILENAME",8
(compare this file from disk drive 8)
VERIFY "*",9
(compare the first program 9)
VERIFY FILE$,1
(compare the file, which is in the string FILE$ on tape)
10000 REM SUBROUTINE SAVE ON DISK WITH VERIFYING
10001 SAVE FILE$,8
10002 VERIFY FILE$,8
10003 RETURN
BASIC V2.0 (second release) Commands

ABS | AND | ASC | ATN | CHR$ | CLOSE | CLR | CMD | CONT | COS | DATA | DEF | DIM | END | EXP | FN | FOR | FRE | GET | GET# | GOSUB | GOTO | IF | INPUT | INPUT# | INT | LEFT$ | LEN | LET | LIST | LOAD | LOG | MID$ | NEW | NEXT | NOT | ON | OPEN | OR | PEEK | π | POKE | POS | PRINT | PRINT# | READ | REM | RESTORE | RETURN | RIGHT$ | RND | RUN | SAVE | SGN | SIN | SPC | SQR | STATUS/ST | STEP | STOP | STR$ | SYS | TAB | TAN | THEN | TIME/TI | TIME$/TI$ | TO | USR | VAL | VERIFY | WAIT