updf_prop_set_at

updf_prop_set_at writes a property.

bool = updf_prop_set_at(props, name, prop_val)

Return Value

If the function succeeds, the return value is TRUE (1); otherwise it is FALSE (0).

Parameters

props

props.

name

name is a property name. The name is limited to 255 characters and can contain the following characters: a-z, A-Z, 0-9 and the four special characters “_”, “-“, “:” and “.”. The period can be used as the last character.

prop_val

prop_val is a property-value (see updf_propval_new).

Example

def test_updf_prop_set_at()
{
    ssFile = GetTempPath() + "test-prop-set-at.updf";

    stg = updf_create_file(ssFile)

    props = updf_prop_open(stg);
    updf_prop_set_at(props, "abc", updf_propval_new(1.23));

    pv = updf_prop_get_at(props, "abc");
    if (type(pv) == "error") {
        error();
    }
    val = updf_propval_get(pv);
    if (val != 1.23) {
        error();
    }
    updf_prop_close(props);

    updf_close_storage(stg);
}

test_updf_prop_set_at();

History

Version Description
5.6.0 New

id-195643