The System built-in functions are a collection of methods and attributes designed to aid the programmer in obtaining information about Livelink itself, and the environment in which Liveink is running. This information ranges from the version number of the operating system, to thread identifiers, to the file extensions used for shared libraries. Almost none of these methods have the ability to change the environment in any way - they exist simply to return setup, configuration, and environment data.
String DOS
The String "DOS".
EnglishInteger English
The Integer constant that represents the English language.
JapaneseInteger Japanese
The Integer constant that represents the Japanese language.
KoreanInteger Korean
The Integer constant that represents the Korean language.
MacString Mac
The String "Mac".
MotifString Motif
The String "Motif"
NotEncodedInteger NotEncoded
The Integer constant for a character encoding of Not Encoded.
UnixString Unix
The String "Unix"
UTF8Integer UTF8
The Integer constant for a character encoding of UTF-8.
WindowsString Windows
The String "Windows"
AppBuildNoString AppBuildNo()
Gets the Livelink application build number as a String.
String AppPatchLevel()
Deprecated Gets the Livelink application patch level as a String.
String AppVersion()
Gets the Livelink version as a String. The major, minor, and incremental release number will appear separated by dots. For example: "8.0.1" would indicate Livelink Version 8.0.1.
List AppVersionList()
Gets the Livelink version as a List. The major, minor, and incremental release numbers will each appear as elements in the list. For example: {'8','0','1'} would indicate Livelink Version 8.0.1. Development builds will contain a character element 'd' followed by the development build number.
Boolean BaselineRefCounts()
Resets the baseline for OScript object refcounts output by System.RefCounts().
Integer CharEncoding( [Integer encodingType] )
Gets or sets system character encoding.
encodingType | - | If specified, valid constants are either System.NotEncoded or System.UTF8. This argument should only be used at startup and only in a single threaded (Builder) environment. The multi-threaded server will have this set at startup based on configuration ini settings. |
String CurrentLocaleSuffix()
Gets the thread current Locale suffix.
String DefaultLocaleSuffix()
Gets the system default Locale suffix.
String EOL()
Gets the OS specific line terminator string.
String FilePrefsPath( [String path] )
Gets or sets the fully qualified path of the default configuration file.
path | - | If specified, this string sets the default path to the configuration file. This argument should only be used at startup and only in a single threaded (Builder) environment, since a cached and shared version of the configuration file is used in multi-threaded environments. |
Assoc GetLocaleDateFormats()
Returns an Assoc containing the date/time formats for all locales.
Integer IntlLanguage( [Integer languageConstant] )
Gets or sets system language.
languageConstant | - | If specified, valid constants are System.English, System.Japanese, or System.Korean. This is deprecated and has been replaced with the Locale support. This argument should only be used at startup and only in a single threaded (Builder) environment. The multi-threaded server will have this set at startup based on configuration ini settings. |
Boolean IntlStrings( [Boolean flag] )
Gets or sets the system international strings flag.
flag | - | If specified, TRUE directs the system to use string handling routines that support international languages, FALSE indicates the system can use 7-bit ASCII only routines. This argument should only be used at startup and only in a single threaded (Builder) environment. The multi-threaded server will have this set at startup based on configuration ini settings. |
String LanguageCode()
Returns a three character country code indicating the language in which the string resources were compiled, and the language in which the Livelink .XDBs were compiled. For example: "USA" for American English or "GER" for German.
String LibSuffix()
Returns the dotted file extension for a shared library in the environment on which Livelink is running, such as ".DLL".
Boolean Mac()
True if Livelink is running in a Macintosh environment.
Boolean Motif()
Not used.
Boolean MultiByte( [Boolean flag] )
Gets or sets the system multibyte strings flag.
flag | - | If specified, TRUE directs the system to use multibyte string handling routines that support multibyte character sets, FALSE indicates the system will use fixed width character string routines. This argument should only be used at startup and only in a single threaded (Builder) environment. The multi-threaded server will have this set at startup based on configuration ini settings. |
String Name()
Determines the name of the operating system on which Livelink is running.
Boolean ProfileOff()
Not used.
Boolean ProfileOn()
Not used.
String RefCounts()
Returns a formatted string containing information about the current number of referenced OScript objects.
The string returned by this method contains 1 line for each refcounted object type. Each line contains 6 fields, separated by 1 or more spaces.
Field 1 is a 4-character Integer, the object type number, i.e. -1 for Strings
Field 2 is a 13-character String, the object type name, i.e. String
Field 3 is a 7-character Integer, the total number of objects of this type allocated on the server
Field 4 is a 7-character Integer, the total number of references to objects of this type allocated on the server
Field 5 is a 7-character Integer, the difference between the current total number of objects of this type allocated on the server and either the total number of objects of this type allocated on the server since the last time System.BaselineRefCounts() was called, or 0 if System.BaselineRefCounts() has never been called.
Field 6 is a 7-character Integer, the difference between the current total number of references to objects of this type allocated on the server and either the total number of references to objects of this type allocated on the server since the last time System.BaselineRefCounts() was called, or 0 if System.BaselineRefCounts() has never been called.
For example, executing this script:
System.BaselineRefCounts() File test1 = File.StringToFile( "test1.txt" ) File test2 = File.StringToFile( "test2.txt" ) List test3 = { test1, test2 } echo( System.RefCounts() )
Would produce output similar to:
-108 ListExpand 0 0 0 0 -107 File 2 4 2 4 -102 Socket 1 1 0 0 -86 Vis 59 99 0 0 -85 VisTag 0 0 0 0 -66 CAPILog 1 1 0 0 -63 PrefSection 0 0 0 0 -62 DOMParser 0 0 0 0 -43 SAXParser 4 4 0 0 -18 Assoc 766 770 0 0 -9 Fileprefs 3 3 0 0 -8 Long 0 0 0 0 -7 Date 61 61 0 0 -4 Real 0 0 0 0 -3 Script 14149 14182 0 0 -2 List 10415 10599 1 1 -1 String 30709 40246 2 2
Examining the output indicates, for instance, that for objects of type -1, String, there were 30709 String objects allocated on the server at that time and that there were 40246 in-memory references to those 30709 Strings. Furthermore, 2 new String objects had been allocated since the last time System.BaselineRefCounts() was called, and each of those new Strings had only 1 reference to them.
Examining the output for objects of type -107, File, shows that there were 2 File objects allocated on the server at that time and that there were 4 in-memory references to those 2 Files. Furthermore, both of those File objects had been allocated since the last time System.BaselineRefCounts() was called.
String SetCurrentLocaleSuffix( [String suffix] )
Sets the thread current Locale suffix.
suffix | - | The string should be of the form underscore and 2 char language code, optional underscore and 2 char uppercase country code, optional underscore and variant string. For example: _en_US. This argument can be used on a per request basis in order to set the current Locale for that request. The Locale suffix will be used to load the proper localized string property resources. |
String Sleep( [String duration] )
Puts the current thread to sleep for a period of time.
suffix | - | The time duration to sleep in milliseconds. |
Integer ThreadID()
Returns the unique Integer indicating the current thread identification.
Integer ThreadIndex()
Returns the unique Integer indicating the current thread's index. For more coherent logging and reference, the Livelink server assigns an ordered integer from 1 to n to all threads. In the "single-threaded" Builder environment, the current thread index will always be 0.
Boolean Unix()
True if Livelink is running in a Unix environment.
String Version()
Determines the version number of the operating system.
Boolean Win32()
True if Livelink is running in a 32-bit Windows environment.
Boolean Windows()
True if Livelink is running in a Windows environment.