com.stata.sfi
Class Scalar

java.lang.Object
  extended by com.stata.sfi.Scalar

public final class Scalar
extends Object

Routines for interacting with a Stata scalar.


Method Summary
static Double getValue(String name)
          Get the contents of a Stata scalar.
static int setValue(String name, double val)
          Set the value of a Stata scalar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getValue

public static Double getValue(String name)
Get the contents of a Stata scalar.

Parameters:
name - Name of the scalar.
Returns:
Value of the scalar. Returns null if the scalar is not found.

setValue

public static int setValue(String name,
                           double val)
Set the value of a Stata scalar. If necessary the scalar will be created.

Parameters:
name - Name of the scalar.
val - Value to store in the scalar.
Returns:
Return code from Stata; 0 if successful.