Visara Master Console Center Scripting Guide Uživatelský manuál Strana 106

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 262
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 105
Chapter 5 Script Commands
Scripting Guide 106
FILENO
Syntax
FILENO(%FileHandle) ==> %FileDescriptor
Description:
Obtains the system integer file descriptor from a file handle.
Action:
Obtains the system integer descriptor from the given file handle. Some
external system calls require the descriptor instead of a handle so this
is most useful in interfacing with shell scripts.
Parameters:
%FileHandle: Numeric expression. The file handle obtained from
FOPEN.
Returns:
Numeric value, as follows:
-1 = Error occurred (not a valid file handle)
Any other value = The system file descriptor.
Example:
%fd := FILENO(%handle)
IF ( %tmpfile == -1 )
LOG( LOG_FLT, STR(%handle) + " is not a valid file
handle!", 6)
ELSE
LOG( LOG_FLT, "Descriptor is " + STR(%fd), 6)
ENDIF
See Also:
FOPEN, FREAD, FWRITE, FCLOSE, MKSTEMP
Zobrazit stránku 105
1 2 ... 101 102 103 104 105 106 107 108 109 110 111 ... 261 262

Komentáře k této Příručce

Žádné komentáře