HOST_ADDR

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > TcpUdp (Networking) >

HOST_ADDR

 

Description

 

Returns the IP address of the local machine.

 

Syntax

 

n = HOST_ADDR [(nIndex)]

 

Returns

 

Number.

 

Parameters

 

Name

Type

Optional

Meaning

nIndex

Number

Yes

The optional number of the computer interface

 

Remarks

 

You can retrieve the first IP address with nIndex = 1, the second with nIndex = 2, etc.

If return value is zero, there are no further IP addresses to retrieve.

If no nIndex is specified, the first IP is returned.

 

Restrictions

 

See also

 

Examples