Stg_get()

Top  Previous  Next

Description:

API procedure, reads (gets) the value of the specified setting's member; reports errors through callback_stg_error().

Syntax:

function stg_get(byref stg_name_or_num as string, index as byte) as string

Returns:

Successful execution: the current value of the specified setting's member.

Some error, except EN_STG_STATUS_UNKNOWN or EN_STG_STATUS_INVALID_INDEX: the default value of this setting's member, plus the callback_stg_error() is called, too. One of the following errors could be reported: EN_STG_STATUS_OK, EN_STG_STATUS_NOT_STARTED, EN_STG_STATUS_UNKNOWN, EN_STG_STATUS_INVALID_INDEX, EN_STG_STATUS_FAILURE, EN_STG_STATUS_INVALID.

When STG_TIMESTAMP is 1, also returns the setting change timestamp through the stg_timestamp global variable.

See Also:

Using Stg_get() and Stg_set()

 


Part

Description

stg_name_or_num

Setting name or number. If the supplied string does not start with a digit (0-9), then the string is interpreted as the name of the setting. If the string starts with a digit, then this will be interpreted as the setting number. Settings are numbered counting from 0, and in the order of their appearance in the setting configurator.

index

Setting member.

Details

Callback_stg_error() is invoked if any error is detected during this procedure's execution. One of the following errors could be reported: EN_STG_STATUS_OK, EN_STG_STATUS_NOT_STARTED, EN_STG_STATUS_UNKNOWN, EN_STG_STATUS_INVALID_INDEX, EN_STG_STATUS_FAILURE, EN_STG_STATUS_INVALID.

Callback_stg_pre_get() is called when this procedure executes. This provides a "central location" for updating setting values before returning them  throughstg_get().