Next: , Previous: , Up: The Record Library   [Index]


13.5.7 Data Type Specific Record Functions

r_a_<type-name>

void r_a_<type-name>(record r, text s, <type> d);

inserts data of the <type> data type and d value in the s position in the r record if r record does not map s, does nothing otherwise

r_b_<type-name>

<type> r_b_<type-name>(record r, text s, <type> d);

is the data in the s position in the r record, as replaced by the function with a reference to the d data (the types of the replaced and replacing data do not have to match, the function applies only to data types allowing for multiple references)

See Referable Objects.

r_c_<type-name>

<type> r_c_<type-name>(record r, text s, <type> d);

is the data in the s position in the r record, as inserted or replaced by the function with a reference to the d data (the types of the replaced and replacing data do not have to match, the function applies only to data types allowing for multiple references)

See Referable Objects.

r_d_<type-name>

void r_d_<type-name>(record r, text s, <type> d);

inserts a reference to the d data in the s position in the r record if r does not map s, does nothing otherwise (the function applies only to data types allowing for multiple references)

See Referable Objects.

r_e_<type-name>

<type> r_e_<type-name>(<type> &d, record r, text s);

is the data in the s position in the r record, sets d as the same data (assumed of the <type> data type) and removes s from r

r_ec_<type-name>

<type> r_ec_<type-name>(<type> &d, record r, text s);

is the data in the s position in the r record, sets d as the same data and removes s from r. Like the r_e_* functions, with some implicit conversions performed for mismatching types.

r_f_<type-name>

<type> r_f_<type-name>(record r, text s, <type> d);

is the data in the s position in the r record, as inserted or replaced by the function with data of the <type> data type and d value (the types of the replaced and replacing data do not have to match)

See Copyable Non Referable Objects.

r_g_<type-name>

<type> r_g_<type-name>(<type> &d, record r, text s);

is the data in the s position in the r record, sets d as the same (data is linked if allowed, copied otherwise, data assumed of the <type> data type)

r_gc_<type-name>

<type> r_gc_<type-name>(<type> &d, record r, text s);

is the data in the s position in the r record, sets d as the same. Like the r_g_* functions, with some implicit conversions performed for mismatching types. Data is linked if type allowed, copied otherwise.

r_j_<type-name>

integer r_j_<type-name>(<type> &d, record r, text s);

is 0 if the r record does not map s or if the data in the s position is not of the <type> data type, non zero otherwise. Sets d as the data in the s position for the latter case (links data if the data type allows, copies it otherwise).

r_k_<type-name>

integer r_k_<type-name>(<type> &d, record r, text s);

is 0 if the r record does map s and if the data in the s position is not of the <type> data type, non zero otherwise. Inserts data of the <type> data type and some <type> data type specific default value in the s position if r does not map s. Sets d to refer the data in the s position if the data is of the <type> data type.

Equivalent to:

integer
r_k_<type-name>(<type> &d, record r, text s)
{
    if (!r_key(r, s)) {
        r_n_<type-name>(r, s);
    }

    return r_j_<type-name>(d, r, s);
}

r_l_<type-name>

<type> r_l_<type-name>(record r, text s, <type> d);

is d, inserts a reference to the d data in the s position in the r record (the function applies only to data types allowing for multiple references)

See Referable Objects.

r_n_<type-name>

<type> r_n_<type-name>(record r, text s);

is (new) data of the <type> data type and some <type> data type specific default value in the s position in the r record (data is created by the function call)

r_o_<type-name>

integer r_o_<type-name>(<type> &d, record r, text s);

is 0 if the r record does not map s or if the data in the s position is not of the <type> data type, non zero otherwise. Sets d as the data in the s position for the latter case and removes it from the record.

r_p_<type-name>

<type> r_p_<type-name>(record r, text s, <type> d);

is the <type> data in the s position in the r record, a function inserted copy of d

See Copyable Non Referable Objects.

r_q_<type-name>

<type> r_q_<type-name>(record r, text s);

is the data in the s position in the r record (assumed of the <type> data type)

r_qc_<type-name>

<type> r_qc_<type-name>(record r, text s);

is the data in the s position in the r record. Like the r_q_* functions, with some implicit conversions performed for mismatching types.

r_r_<type-name>

<type> r_r_<type-name>(record r, text s, <type> d);

is the data in the s position in the r record, as replaced by the function with data of the <type> data type and d value (the types of the replaced and replacing data do not have to match)

See Copyable Non Referable Objects.

r_s_<type-name>

integer r_s_<type-name>(record r, text s);

is non zero if the data in the s position in the r record is of the <type> data type, zero if it is not

r_v_<type-name>

<type> r_v_<type-name>(record r, text s);

is (new) data of the <type> data type in the s position in the r record (data is created by the function call if r does not map s and set to some <type> data type specific default value)

r_x_<type-name>

<type> r_x_<type-name>(record r, text s);

is the data in the s position in the r record (assumed of the <type> data type), the data is removed from the record

r_xc_<type-name>

<type> r_xc_<type-name>(record r, text s);

is the data in the s position in the r record, the data is removed from the record. Like the r_x_* functions, with some implicit conversions performed for mismatching types.


Next: Data Type Specific Record Front Functions, Previous: Byte Data Record Search Functions, Up: The Record Library   [Index]