Returning user licence information

users()

Return user licence information


SYNTAX

users(int_expression)

Returns an item of Sculptor user licence information. The information returned is determined by the value of int_expression, as follows:

itemno

Information

Return value

1

Serial number

Integer.

2

Number of licensed users

Integer. Returns 0 if there is no limit.

3

Reserved

4

Operating system name

“UNIX” or “MSDOS”

5

Operating system subtype

Only applies if users(4) = “MSDOS”. Returns one of
“DRMDOS” (Digital Research DOS)
“MSDOS”
“MSNET”
“NOVELL”
“WINDOWS”

6

Operating system extras

“WINE:”

NOTES


EXAMPLE

  1. Only execute a program if the operating system is Windows:

    if (users(5) <> "WINDOWS") {
        error "This program requires Microsoft Windows"
        exit
    }
    
  2. In this example, different statements are executed depending on whether the program is running under GUI or character windows:

    switch (users(5)) {
        case = "WINDOWS":
        statements
        break
    
    default:
        statements
        break
    }
    
  3. Show message if running in Wine on Unix/Linux:

    if (users(6) ct "WINE:") {
        prompt "Running on WINE!"
    }
    

RELATED TOPICS

Servers

Character windows