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

📄 getint.3

📁 linux系统下的音频通信
💻 3
字号:
'\"'\" Copyright (c) 1989-1993 The Regents of the University of California.'\" Copyright (c) 1994-1996 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: @(#) GetInt.3 1.12 96/03/25 20:03:44'\" .so man.macros.TH Tcl_GetInt 3 "" Tcl "Tcl Library Procedures".BS.SH NAMETcl_GetInt, Tcl_GetDouble, Tcl_GetBoolean \- convert from string to integer, double, or boolean.SH SYNOPSIS.nf\fB#include <tcl.h>\fR.spint\fBTcl_GetInt\fR(\fIinterp, string, intPtr\fR).spint\fBTcl_GetDouble\fR(\fIinterp, string, doublePtr\fR).spint\fBTcl_GetBoolean\fR(\fIinterp, string, boolPtr\fR).SH ARGUMENTS.AS Tcl_Interp *doublePtr.AP Tcl_Interp *interp inInterpreter to use for error reporting..AP char *string inTextual value to be converted..AP int *intPtr outPoints to place to store integer value converted from \fIstring\fR..AP double *doublePtr outPoints to place to store double-precision floating-pointvalue converted from \fIstring\fR..AP int *boolPtr outPoints to place to store boolean value (0 or 1) converted from \fIstring\fR..BE.SH DESCRIPTION.PPThese procedures convert from strings to integers or double-precisionfloating-point values or booleans (represented as 0- or 1-valuedintegers).  Each of the procedures takes a \fIstring\fR argument,converts it to an internal form of a particular type, and storesthe converted value at the location indicated by the procedure'sthird argument.  If all goes well, each of the procedures returnsTCL_OK.  If \fIstring\fR doesn't have the proper syntax for thedesired type then TCL_ERROR is returned, an error message is leftin \fIinterp->result\fR, and nothing is stored at *\fIintPtr\fRor *\fIdoublePtr\fR or *\fIboolPtr\fR..PP\fBTcl_GetInt\fR expects \fIstring\fR to consist of a collectionof integer digits, optionally signed and optionally preceded bywhite space.  If the first two characters of \fIstring\fR are ``0x''then \fIstring\fR is expected to be in hexadecimal form;  otherwise,if the first character of \fIstring\fR is ``0'' then \fIstring\fRis expected to be in octal form;  otherwise, \fIstring\fR isexpected to be in decimal form..PP\fBTcl_GetDouble\fR expects \fIstring\fR to consist of a floating-pointnumber, which is:  white space;  a sign; a sequence of digits;  adecimal point;  a sequence of digits;  the letter ``e'';  and asigned decimal exponent.  Any of the fields may be omitted, except thatthe digits either before or after the decimal point must be presentand if the ``e'' is present then it must be followed by theexponent number..PP\fBTcl_GetBoolean\fR expects \fIstring\fR to specify a booleanvalue.  If \fIstring\fR is any of \fB0\fR, \fBfalse\fR,\fBno\fR, or \fBoff\fR, then \fBTcl_GetBoolean\fR stores a zerovalue at \fI*boolPtr\fR.If \fIstring\fR is any of \fB1\fR, \fBtrue\fR, \fByes\fR, or \fBon\fR,then 1 is stored at \fI*boolPtr\fR.Any of these values may be abbreviated, and upper-case spellingsare also acceptable..SH KEYWORDSboolean, conversion, double, floating-point, integer

⌨️ 快捷键说明

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