SYNOPSIS
#include <tcl.h>
Tcl_Obj * Tcl_NewIntObj(intValue)
Tcl_Obj * Tcl_NewLongObj(longValue)
Tcl_SetIntObj(objPtr, intValue)
Tcl_SetLongObj(objPtr, longValue)
int Tcl_GetIntFromObj(interp, objPtr, intPtr)
int Tcl_GetLongFromObj(interp, objPtr, longPtr)
ARGUMENTS
- int intValue (in)
-
Integer value used to initialize or set an integer object.
- long longValue (in)
-
Long integer value used to initialize or set an integer object.
- Tcl_Obj *objPtr (in/out)
-
For
Tcl_SetIntObj() andTcl_SetLongObj() , this points to the object to be converted to integer type. ForTcl_GetIntFromObj() andTcl_GetLongFromObj() , this refers to the object from which to get an integer or long integer value; if objPtr does not already point to an integer object, an attempt will be made to convert it to one. - Tcl_Interp *interp (in/out)
-
If an error occurs during conversion, an error message is left in the interpreter's result object unless interp is NULL.
- int *intPtr (out)
-
Points to place to store the integer value obtained by
Tcl_GetIntFromObj() from objPtr. - long *longPtr (out)
-
Points to place to store the long integer value obtained by
Tcl_GetLongFromObj() from objPtr.
DESCRIPTION
These procedures are used to create, modify, and read
integer Tcl objects from C code.
PORTABILITY
Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022. Windows Server 2025.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
Tcl_DecrRefCount() ,Tcl_GetObjResult() ,Tcl_IncrRefCount() ,Tcl_NewObj()
PTC MKS Toolkit 10.5 Documentation Build 40.