Page::LT_set_var

Description

Set LabTalk variable value temporarily setting this page as the active page.

Syntax

BOOL LT_set_var( LPCSTR lpcszLabTalkVarName, double dbValue )

Parameters

lpcszLabTalkVarName
[input] LabTalk variable name, case insensitive
dbValue
[output] the new value

Return

TRUE if OK, and FALSE if it fails.

Examples

EX1

void    Page_LT_set_var_ex1()
{
    double vv;
    GraphPage gp;
    gp.Create("origin");
    if( gp )
    { 
                gp.LT_get_var("page.height", &vv);
                out_double("page's height is ", vv);
        vv += 10;
        // Set the new value:
        if(gp.LT_set_var("page.height", vv))
            out_str("set page's height in LabTalk succeeded");
        else
            out_str("set page's height in LabTalk failed");
 
        gp.LT_get_var("page.height", &vv);
        out_double("new value is ", vv);
    }
}

Remark

Sets the value of a LabTalk global string variable or a LabTalk object string property.

See Also

Page::LT_get_var

header to Include

origin.h

Reference