The _CP_atvar function reads and writes D3 shell variables. It is equivalent to the BASIC u91 user exit.
_CP_atvar(CPSTR ** result, CPSTR * input)
result | The result from processing the input parameter. |
input | This parameter can take on the following four forms:
|
CPSTR * AM = _CP_mkstrl("\xfe", 1); CPSTR * VM = _CP_mkstrl("\xfd", 1); CPSTR * connectionType = _CP_mkstr("CONNECTIONTYPE"); CPSTR * connectionTypeValue = _CP_mkstr("web interface"); CPSTR * input = _CP_str_null;; CPSTR * result = _CP_str_null; // Display existing D3 shell variable names. if (_CP_atvar(&result, _CP_str_null) == 0) _CP_print(result); // Set the D3 shell variable called CONNECTIONTYPE to "web interface". _CP_cat(&input, connectionType, AM); _CP_cat(&input, input, connectionTypeValue); if (_CP_atvar(&result, input) == 0) _CP_print(result); // Display existing D3 shell variable names, followed by the value of the CONNECTIONTYPE variable. if (_CP_atvar(&result, _CP_str_null) == 0) _CP_print(result); if (_CP_atvar(&result, connectionType) == 0) _CP_print(result); // Delete the CONNECTIONTYPE variable then the display the remaining D3 shell variables. _CP_cat(&input, connectionType, VM); if (_CP_atvar(&result, input) == 0) _CP_print(result); if (_CP_atvar(&result, _CP_str_null) == 0) _CP_print(result); _CP_str_free(input); _CP_str_free(connectionType); _CP_str_free(connectionTypeValue);