Ellié Computing Home Page
My Shopping Cart

Your shopping cart is empty

Display Cart

Call us at +1 586 62 ELLIE / +1 586 62 35543 Office Closed
sales@elliecomputing.com - Contact us


Environment object

 

 

Environment global object.

Syntax

A Environment global object is created for you and only this object can exist in the application. It is named Environment and is globally accessible.

Parameters

none.

Property Of

global name space.

Implemented In

ECMerge 2.1

Description

 The Environment object let you access environment variables.

Properties

none. 

Methods

get_value

Examples

see functions samples.

See Also 

 none.

Method get_value

Syntax

function get_value (value_name)
returns String or undefined

Parameters

value_name. String. Name of the environment variable to retrieve

Method Of

Environment object

Implemented In

ECMerge 2.1

Description

Queries the value of an environment variable. Returns undefined if the value is not found, and the string contained by the variable otherwise.

Examples

Example 1.

Get the well-known PATH variable and split it according to platform specific uses:

var paths;
var path = Environment.get_value ("PATH");
if (path !== undefined)
{
    if (Machine.system_name.match (/win.*/i))
        paths = path.split (";");
    else
        paths = path.split(":");
}

See Also 

 Machine object