Home
Manual
Packages
Global Index
Keywords
Quick Reference
|
functions in string.i -
getdate
|
getdate -- get date of the day in the form "DD/MM/YY"
SYNOPSIS: date= getdate();
getdate, date;
HISTORY: October 30, 1995 by Eric THIEBAUT.
|
SEE ALSO:
|
gettime,
parsedate,
timestamp
|
gettime
|
gettime -- get current time in the form "HH:MM:SS"
SYNOPSIS: time= gettime();
gettime, time;
HISTORY: October 30, 1995 by Eric THIEBAUT.
|
SEE ALSO:
|
getdate,
parsedate,
timestamp
|
parsedate
|
parsedate -- get numerical version of a timestamp
SYNOPSIS: parsedate, timestamp, day,month,year, hour,minute,second;
parsedate(timestamp)
HISTORY: October 30, 1995 by Eric THIEBAUT.
DHM modified for yorick-1.6 23/Jan/05
|
SEE ALSO:
|
gettime,
getdate,
timestamp
|
scalar
|
scalar -- get optional scalar parameter
PROTOTYPE
x = scalar(xarg, xdef, lt=, le=, gt=, ge=, type=, arg=, fn=);
ARGUMENTS
XARG argument passed to the function.
XDEF default value for the scalar argument (optional, if not
specified, then it is guessed that the caller must supply the
argument).
KEYWORDS
GE= to be valid, XARG must be >= GE (optional, only one of GT or GE
can be used).
GT= to be valid, XARG must be > GT (optional, only one of GT or GE
can be used).
LE= to be valid, XARG must be <= LE (optional, only one of LT or LE
can be used).
LT= to be valid, XARG must be < LT (optional, only one of LT or LE
can be used).
TYPE= data type of the scalar (optional).
FN= function name for error messages (optional string).
ARG= argument name for error messages (optional string).
DESCRIPTION
Check XARG and return a scalar value (i.e., either XARG converted to TYPE
if it is not void or XDEF otherwise). If XARG is not within any specified
bound or if it is not a scalar or if it is void (e.g., not specified) and
there is no default value XDEF, an error message is written out.
EXAMPLE
The following function has 2 scalar arguments X and Y, the 1st one is an
integer (of type long) which must be specified and be strictly greater
than 22 while the 2nd default to .5 and must be in [0., 1.]:
func foo(x,y) {
x= scalar(x, gt=22, type=long, fn="foo", arg="X");
y= scalar(y, .5, ge=0., le=1., type=double, fn="foo", arg="Y");
...
}
WARNING
There is no checking of consistency of options.
HISTORY: 29 Sept. 1995 by Eric THIEBAUT. (Modified slightly by DHM)
|
strchr
|
strchr -- get first/last index of a character in a string
SYNOPSIS: i = strchr(s, c)
i = strchr(s, c, last=1)
DIAGNOSTIC: returns 0 if character C is not found in string S.
HISTORY: October 27, 1995 by Eric THIEBAUT.
DHM modified for yorick-1.6 23/Jan/05
********** DEPRECATED **************
new code should use strfind directly
|
SEE ALSO:
|
strmatch
|
strtolower
|
strtolower -- convert a string to lower case letters
SYNOPSIS: s2 = strtolower(s)
HISTORY: October 10, 1995 by Eric THIEBAUT.
DHM modified for yorick-1.6 23/Jan/05
********** DEPRECATED **************
new code should use strcase directly
|
SEE ALSO:
|
strtoupper
|
strtoupper
|
strtoupper -- convert a string to upper case letters
SYNOPSIS: s2 = strtoupper(s)
HISTORY: October 10, 1995 by Eric THIEBAUT.
DHM modified for yorick-1.6 23/Jan/05
********** DEPRECATED **************
new code should use strcase directly
|
SEE ALSO:
|
strtolower
|
|