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


11.4.6 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>

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

replaces data in the s position in the r record 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 refereces)

See Referable Objects.

r_c_<type-name>

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

inserts or replaces data in the s position in the r record 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 refereces)

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 it from the record

r_f_<type-name>

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

inserts or replaces data in the s position in the r record with data of the <type> data type and d value (the types of the replaced and replacing data do not have to match)

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_i_<type-name>

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

is the data in the s position in the r record, sets d as the same (conversions between intrinsic numerical types are performed, <type> is one of them)

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>

void r_l_<type-name>(record r, text s, <type> 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_p_<type-name>

void r_p_<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

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_r_<type-name>

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

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

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_y_<type-name>

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

is the data in the s position in the r record (conversions between intrinsic numerical types are performed, <type> is one of them)


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