page_set_info_var_value

 

Description

Set the value of a variable in a Page's Info section


Set the value of a variable in a Page's Info section

Syntax

bool page_set_info_var_value( Page & pg, LPCSTR lpcszVarName, LPCSTR lpcszVarVal, LPCSTR lpcszStorageSection = NULL, int* pnPreferNodeType = NULL )

bool page_set_info_var_value( Page & pg, LPCSTR lpcszVarName, double dVal, LPCSTR lpcszStorageSection = NULL )

Parameters

pg
[input] the page containing the variable to set
lpcszVarName
[input] pointer to the name of the variable
lpcszVarVal
[input] pointer to the string value
lpcszStorageSection
[input] pointer to the name of the section. If NULL then the Variables section is used.
pnPreferNodeType
[input] pointer to the node type of the section. If NULL then the variable type will be auto detected.

pg
[input] the page containing the variable to set
lpcszVarName
[input] pointer to the name of the variable
dVal
[input] pointer to the double value
lpcszStorageSection
[input] pointer to the name of the section. If NULL then the Variables section is used.

Return

If success then true else false


If success then true else false

Examples

EX1

void Run_page_set_info_var_value_Ex1()
{
    Page pg("Book1");    
    bool bRet = page_set_info_var_value(pg,"var","abc","user.var");    
}


EX2

void Run_page_set_info_var_value_Ex2()
{
    Page pg("Book1");    
    bool bRet = page_set_info_var_value(pg,"var",12.25,"user.var");    
}

Remark

See Also

page_get_info_var_value

header to Include

origin.h

Reference