Core Function EvalGet

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> EvalGet( <evalObject>, <name> ) </pre> === Description === Get a from variable inside an Eval Object. === Parameters === ==== evalObject ==== An Eval Object created f...")
 
m (1 revision)
 
(2 intermediate revisions by one user not shown)
Line 30: Line 30:
  
 
<syntaxhighlight lang="sputnik">
 
<syntaxhighlight lang="sputnik">
 +
// Create an Eval Object
 +
my $EvalSpk = EvalCreate();
 +
 
// Create and get the variable
 
// Create and get the variable
 
if(  EvalSet($EvalSpk, "Test", 1221)  )
 
if(  EvalSet($EvalSpk, "Test", 1221)  )

Latest revision as of 12:37, 14 June 2015

EvalGet( <evalObject>, <name> )

Contents

Description

Get a from variable inside an Eval Object.

Parameters

evalObject

An Eval Object created from EvalCreate().

name

The name of the variable you wish to get.

Return Value

Success: Returns the variable.

Failure: Returns null if the variable is null or was not found.

Remarks

This gets the variable in the GLOBAL scope of the Eval Object.

Example

// Create an Eval Object
my $EvalSpk = EvalCreate();
 
// Create and get the variable
if(  EvalSet($EvalSpk, "Test", 1221)   )
{
	println("Test: " . EvalGet($EvalSpk, "Test"));
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox