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
The number of licensed users returned by users(2) applies to the run time interpreters sagewc and srepwc. It does not apply to the user limit of the Sculptor server program kfserver | kfservnt, which is separate and may be different.
EXAMPLE
Only execute a program if the operating system is Windows:
if (users(5) <> "WINDOWS") { error "This program requires Microsoft Windows" exit }
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 }
Show message if running in Wine on Unix/Linux:
if (users(6) ct "WINE:") { prompt "Running on WINE!" }
RELATED TOPICS |