version 2003
PA_SetStringVariable (aVariable; newString)
Parameter | Type | Description | |
aVariable | PA_Variable * | Pointer to the variable to access | |
newString | char * | New value for aVariable |
Description
The routine PA_SetStringVariable sets the content of the string variable pointed to by aVariable to the string pointed to by newString.
WARNING
The kind of of the variable pointed to by aVariable is set to eVK_String by the routine, even if it was not its previous kind.
Make sure that you do not change 4D variable kinds (using PA_GetVariable), especially in compiled mode.
NOTE:
Depending on default settings or on previous calls to PA_UsePStrings or PA_UseCStrings, newString must be a Pascal or a C string.
Example
Wrapper of PA_SetStringVariable, checking the type.
void mySetStringVariable(PA_Variable *v, char *s) { if(PA_GetVariableKind(*v) == eVK_String) PA_SetStringVariable(v, s); }
See Also
No reference.
Error Handling
PA_GetLastError keeps the last error that occurred before calling the routine.