Guardian Programmer's Guide

Table Of Contents
Manipulating File Names
Guardian Programmer’s Guide 421922-014
13 - 29
Finding the Next Matching File Name
IF ERROR = 6 THEN
BEGIN
!Continue processing based on message number:
CASE BUFFER[0] OF
BEGIN
!If message is nowait return from
!FILENAME_FINDNEXT_, check word 2 of message for
!search error. If no error, move the name string
!out of the message and into the NAME variable:
-109 -> BEGIN
IF BUFFER[2] = 0 THEN
NAME ':=' BUFFER[14] FOR BUFFER[8];
END;
.
.!Other system messages:
OTHERWISE ->...
END;
END
!Or if it is not a system message:
ELSE ...
END;
For complete details on the Nowait FILENAME_FINDNEXT_ completion message,
refer to the Guardian Procedure Errors and Messages Manual.
Returning Characteristics of Found Entities
You can retrieve information about each entity returned by the
FILENAME_FINDNEXT_ procedure by supplying the entityinfo parameter—a
container for the returned information. Returning information in this way is often more
convenient than calling other procedures to retrieve the same information.
Information returned in the entityinfo parameter includes the following:
Word 0 Contains the device type of the entity. Device types are listed in the
Guardian Procedure Calls Reference Manual.
Word 1 Contains the device subtype of the entity. Device subtypes are listed in the
Guardian Procedure Calls Reference Manual.