[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|             NETWORK             |
+---------------------------------+
NETWORK()

-----------------------------------
Returns true if you are using FoxPro/LAN.
Return value - Logical
-----------------------------------

This function allows both single-user and network specific commands and
functions to be included in the same program.  Different routines can be
executed based on the logical value returned by NETWORK().

Note that the NETWORK() function does not check to see if a network is
active, but only whether you are using FoxPro/LAN.

The following program example checks if FoxPro or FoxPro/LAN is being
used; it also checks the DOS version.  It then displays an appropriate
message.

+---------------------------------+
|         Program Example         |
+---------------------------------+
CLEAR
SET TALK OFF

STORE NETWORK() TO mnet
STORE OS() TO mdosver

DO CASE

        CASE mnet = .F.                 && Single-user FoxPro
                ? "This is FoxPro"

        CASE mnet = .T. AND "2." $ mdosver      && FoxPro/LAN, DOS 2.XX
                ? "FoxPro/LAN requires DOS 3.1 or"
                ? "higher to lock records and files"
                ? "You are using " + mdosver

        CASE mnet = .T. AND "3.0" $ mdosver     && FoxPro/LAN, DOS 3.0X
                ? "FoxPro/LAN requires DOS 3.1 or"
                ? "higher to lock records and files"
                ? "You are using " + mdosver

        OTHERWISE                                       && FoxPro/LAN, DOS 3.1X or greater
                ? "This is FoxPro/LAN"
ENDCASE

-----------------------------------

See Also:  OS(), VERSION()

-----------------------------------

See Also: OS() VERSION()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson