📄 symtype.3
字号:
.\" Copyright (c) 1987,1988,1989,1990 Entropic Speech, Inc.; All rights reserved.\"@(#)symtype.3 1.5 09 Mar 1990 ESI.TH SYMTYPE 3\-ESPSu 09 Mar 1990.ds ]W "\fI\s+4\ze\h'0.05'e\s-4\v'-0.4m'\fP\(*p\v'0.4m'\ Entropic Speech, Inc..SH NAME.nfsymtype \- return the type of a parameter symsize \- return the size of a parameter symlist \- get list of parameter names and return number of parameterssymdefinite \- indicates whether a run-time parameter prompt will occursymchoices \- get list of discrete choices for a parameter's valuesymrange \- get the value range for a parameter symprompt \- returns the prompt string for a parameter.SH SYNOPSIS.ft B#include <esps/esps.h>.brint.brsymtype(name).brchar *name;.brint.brsymsize(name).brchar *name;.brchar **.brsymlist(nparams).brint *nparams;.brint.brsymdefinite(name).brchar *name;.brchar **.brsymchoices(name, nchoices).brchar *name;.brint *nchoices;.brint.brsymrange(name, min, max).brfloat *min, *max;.brchar *.brsymprompt(name).brchar *name;.br.ft.SH DESCRIPTION.PPThese functions all obtain information from the symbol table createdby calling \fIread_params\fP (3\-\s-1ESPS\s+1). For the valuesthemselves, use the appropriate \fIgetsym\fP (3\-\s-1ESPS\s+1)function. .PP.I symtypereturns the type of the symbol \fIname\fP. Valid symbol types areST_INT, ST_CHAR, ST_FLOAT, ST_STRING, ST_IARRAY, ST_FARRAY, and alsoST_UNDEF. These are defined in <esps/param.h>..PP.I symsizereturns the size of the symbol \fIname\fR. That is, for a scaler itreturns 1 and for an array it returns the array size. If \fIname\fR isundefined, then \fIsymsize\fP returns -1..PP.I symlistreturns a list of the defined symbols in the form of a null-terminatedarray of character pointers (the same form as used by \fIlin_search\fP(3\-\s-1ESPS\s+1)). If the pointer \fInparams\fP is not NULL, thecorresponding variable is set to the number of symbols in the symboltable (number of symbols that were defined in the parameter filespecified in the call to \fIread_params\fP). If there are noparameters defined in the symbol table, \fIsymlist\fP returns NULL andsets *\fInparams\fP to 0 (if \fInparams\fP is non-NULL)..PP.I symdefinitereturns 1 if the parameter symbol \fIname\fP was assigned a definitevalue in the parameter file (i.e., if "=" was used as the assignmentoperator). If the assigned value was indefinite (i.e., "?=" or"=?" was used as the assignment operator), 0 is returned. (Anindefinite value causes a runtime prompt when the appropriate\fIgetsym\fP is called.) If \fIname\fR is undefined, then\fIsymdefinite\fP returns -1..PP.I symchoices returns, a list of the possible choices for the value of the symbol\fIname\fP, represented as a null-terminated array of characterpointers (suitable for use with \fIlin_search\fP (3\-\s-1ESPS\s+1)).If the pointer \fInchoices\fP is not NULL, the corresponding variableis set to number of choices. If the choices were not given for\fIname\fP in the parameter file, \fIsymchoices\fP returns NULL andsets *\fInchoices\fP to 0 (if \fInchoices\fP is non-NULL). Note thatit is acceptable to provide a list of discrete choices for a numericparameter..PP.I symrangereturns 1 if an (optional) parameter range was given in the parameterfile for the symbol \fIname\fP, and 0 if no range was given. If arange was given the minimum and maximum values are returned as floatsvia the parameters \fImin\fP and \fImax\fP. If no range was given,NULL is assigned to \fImin\fP and \fImax\fP. Note that it is anerror to provide a range for a non-numeric parameter. .PP.I sympromptreturns the (optional) prompt string for the symbol \fIname\fP; if noprompt string was provided in the parameter file, NULL is returned. .SH DIAGNOSTICSNone..SH BUGSNone known..SH SEE ALSO.PP\fIread_params\fP (3\-\s-1ESPS\s+1), \fIgetsym\fP (3\-\s-1ESPS\s+1),\fIgetsymdef\fP (3\-\s-1ESPS\s+1), \fIputsym\fP (3\-\s-1ESPS\s+1),\fIfputsym\fP (3\-\s-1ESPS\s+1), ESPS (5\-\s-1ESPS\s+1).SH AUTHORMan page by Ajaipal S. Virdy, Entropic Speech, Inc.; additions by JohnShore
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -