%GETHOSTID

%GETHOSTID


%GETENV Index Level %GETPGRP
Syntax variable = %GETHOSTID()
Category BASIC
Type C Function
Description allows a FlashBASIC application to retrieve the unique 32-bit identifier for the current host. The id is returned as a decimal number.

If the function fails, a value of -1 is returned and the (FlashBASIC) system(0) function returns the value of "errno".

To compile successfully, the program must include the statement:
cfunction  socket.builtin
Options
See Also CFUNCTION %SOCKET %LISTEN %ACCEPT %BIND SYSTEM
Example cfunction  socket.builtin
id=%gethostid()
if id=-1 then
 crt 'Cannot get host id. errno=':system(0)
 stop
end
Warnings This function is BSD extension, and may not be available on all versions of Unix.
Compatibility D3/Unix
%GETENV Index Level %GETPGRP