TclInteger(3)

CLASS
tcl.lang.TclInteger -- This class is used to create, read, and modify integer objects from Java code.

EXTENDS
tcl.lang.InternalRep

METHODS

static TclObject newInstance(int intValue)

static int get(Interp interp, TclObject tobj) throws TclException

static int getForIndex(Interp interp, TclObject tobj, int endValue) throws TclException

static void set(TclObject tobj, int intValue)

ARGUMENTS
New value for internal integer representation. If an error occurs while converting an object to be an integer object, an error message is left in the interpreter's result object unless interp is NULL. TclObject to manipulate. If the internal representation of tobj is not TclInteger, the method converts it to TclInteger. Value returned if tobj is a String object whose value is "end".

DESCRIPTION

newInstance
    The newInstance method creates and returns a new TclObject whose internal representation is the integer intValue.

get The get method returns an integer value from the tobj. If an error occurs while converting tobj to be an integer object, an error message is left in the interp's result object unless interp is NULL.

getForIndex
    The getForIndex method is intended to simplify operations that expect either an integer value or the string "end". If tobj contains the string "end", endValue is returned. Otherwise, the same operations as TclInteger.get are performed.

set The set method sets tobj to have the integer value of intValue. When this method returns, the internal representation of tobj is TclInteger.

EQUIVALENT C FUNCTIONS
Tcl_NewIntObj, Tcl_GetIntFromObj, TclGetIntForIndex, Tcl_SetIntObj

SEE ALSO
InternalRep, TclObject, TclList, TclIndex, TclString, TclDouble, TclBoolean, ReflectObject

KEYWORDS
internal representation, object, object type, integer