⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 boolobj.3

📁 linux系统下的音频通信
💻 3
字号:
'\"'\" Copyright (c) 1996-1997 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) @(#) BoolObj.3 1.7 97/05/08 19:50:57'\" .so man.macros.TH Tcl_BooleanObj 3 8.0 Tcl "Tcl Library Procedures".BS.SH NAMETcl_NewBooleanObj, Tcl_SetBooleanObj, Tcl_GetBooleanFromObj \- manipulate Tcl objects as boolean values.SH SYNOPSIS.nf\fB#include <tcl.h>\fR.spTcl_Obj *\fBTcl_NewBooleanObj\fR(\fIboolValue\fR).sp\fBTcl_SetBooleanObj\fR(\fIobjPtr, boolValue\fR).spint\fBTcl_GetBooleanFromObj\fR(\fIinterp, objPtr, boolPtr\fR).SH ARGUMENTS.AS Tcl_Interp *interp.AP int boolValue inInteger value used to initialize or set a boolean object.If the integer is nonzero, the boolean object is set to 1;otherwise the boolean object is set to 0..AP Tcl_Obj *objPtr in/outFor \fBTcl_SetBooleanObj\fR, this points to the object to be convertedto boolean type.For \fBTcl_GetBooleanFromObj\fR, this refers to the objectfrom which to get a boolean value; if \fIobjPtr\fR does not already point to a boolean object,an attempt will be made to convert it to one..AP Tcl_Interp *interp in/outIf an error occurs during conversion,an error message is left in the interpreter's result objectunless \fIinterp\fR is NULL..AP int *boolPtr outPoints to place where \fBTcl_GetBooleanFromObj\fRstores the boolean value (0 or 1) obtained from \fIobjPtr\fR..BE.SH DESCRIPTION.PPThese procedures are used to create, modify, and readboolean Tcl objects from C code.\fBTcl_NewBooleanObj\fR and \fBTcl_SetBooleanObj\fRwill create a new object of boolean typeor modify an existing object to have boolean type. Both of these procedures set the object to have theboolean value (0 or 1) specified by \fIboolValue\fR;if \fIboolValue\fR is nonzero, the object is set to 1,otherwise to 0.\fBTcl_NewBooleanObj\fR returns a pointer to a newly created objectwith reference count zero.Both procedures set the object's type to be booleanand assign the boolean value to the object's internal representation\fIlongValue\fR member.\fBTcl_SetBooleanObj\fR invalidates any old string representationand, if the object is not already a boolean object,frees any old internal representation..PP\fBTcl_GetBooleanFromObj\fR attempts to return a boolean valuefrom the Tcl object \fIobjPtr\fR.If the object is not already a boolean object,it will attempt to convert it to one.If an error occurs during conversion, it returns \fBTCL_ERROR\fRand leaves an error message in the interpreter's result objectunless \fIinterp\fR is NULL.Otherwise, \fBTcl_GetBooleanFromObj\fR returns \fBTCL_OK\fRand stores the boolean value in the address given by \fIboolPtr\fR.If the object is not already a boolean object,the conversion will free any old internal representation..SH "SEE ALSO"Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_GetObjResult.SH KEYWORDSboolean, boolean object, boolean type, internal representation, object, object type, string representation

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -