Skip to content

SysConf

See Also: Locale Formatting Functions, Miscellaneous Functions

Purpose

Returns a string value containing environment-specific information.

Return Type

String

Syntax

(SysConf({environment_option}))

Where:

What It Does

This function takes a single parameter and returns the appropriate environment-specific information. The valid {environment_options} and the information each returns are listed below.

Environment Options

SysConf_timer_resolution

Returns the number of timer events per second in a DataFlex timer object.

Example

string sVal
move (SysConf(SysConf_timer_resolution)) to sVal
send Info_Box sVal "Timer Events Per Second"

SysConf_dir_separator

Folder separation character for the current environment (e.g., "\" for DOS and Windows, "/" for UNIX or Linux).

Example

string sVal
move (SysConf(SysConf_dir_separator)) to sVal
send Info_Box sVal "Folder Separator"

SysConf_path_separator

Returns the character(s) that are used to separate two folders in a path from each other. In Windows, this is usually the semicolon character.

Example

If (Right(sAppSrcPath, 1) < SysConf(SysConf_path_separator)) Begin
    Move (sAppSrcPath - SysConf(SysConf_path_separator)) To sAppSrcPath
End

SysConf_os_short_name

Returns the operating system short name (e.g., "WIN32" for Windows NT 4.0).

Example

string sVal
move (SysConf(SysConf_os_short_name)) to sVal
send Info_Box sVal "OS Short Name"

SysConf_os_major_rev

Returns the major, or whole-number, operating system revision (e.g., "4" for Windows NT 4.0).

Example

string sVal
move (SysConf(SysConf_os_major_rev)) to sVal
send Info_Box sVal "OS Major Revision"

SysConf_os_minor_rev

Returns the minor, or decimal number, operating system revision (e.g., "0" for Windows NT 4.0).

Example

string sVal
move (SysConf(SysConf_os_minor_rev)) to sVal
send Info_Box sVal "OS Minor Revision"

SysConf_os_name

Returns the specific operating system name (e.g., "Windows NT" for Windows NT 4.0).

Example

string sVal
move (SysConf(SysConf_os_name)) to sVal
send Info_Box sVal "OS Name"

SysConf_machine_name

This environment option is obsolete.

SysConf_file_mask

Returns the wildcard search mask to find all files in the current environment.

Example

string sLine sDrive
integer iChIn
move 2 to iChIn
move "D" to sDrive
direct_input channel iChIn ("DIR: " + sDrive + ":" + (SysConf(SysConf_file_mask)))
while not (seqeof)
    readln channel iChIn sLine
    showln sLine
loop

This code opens and displays a folder of all files in a specified drive (drive D in this example).

SysConf_dataflex_rev

Returns the name of the current DataFlex revision (e.g., "20.0").

Example

string sVal
move (SysConf(SysConf_dataflex_rev)) to sVal
send Info_Box sVal "DataFlex Revision"

SysConf_system_name

Returns the system-specific operating system name.

Example

string sVal
move (SysConf(SysConf_system_name)) to sVal
send Info_Box sVal "System Name"

SysConf_runtime_name

Returns the path and name of the running executable program.

Example

string sVal
move (SysConf(SysConf_runtime_name)) to sVal
send Info_Box sVal "Runtime Executable Path & Name"

SysConf_utc_time_offset

Returns the number of seconds east or west of the meridian.

Example

string sVal
integer iTime
move (SysConf(SysConf_utc_time_offset)) to sVal
move (sVal / 60 / 60) to iTime
send Info_Box ((string(iTime)) + " hours") "Time Offset from Meridian"

SysConf_ComCtl_Rev

Returns what Windows control versions are supported. When the revision is below 6.0, it means that no manifest is in use.

This is used internally to apply some properties to some Windows controls to improve functionality with or without a manifest.

Notes

  • The SysConf function will allow the developer to make use of operating system services without requiring hard-coded references to these services, thereby increasing source code portability.