
01-18-10, 10:55
|
|
Registered User
|
|
Join Date: Sep 2009
Location: Ontario
Posts: 528
|
|
All of the following extracted from the man page for ksh.
Quote:
A parameter is an identifier, one or more digits, or any of the
characters * , @, #, ?, -, $, and !. A named parameter (a
parameter denoted by an identifier) has a value and zero or more
attributes. Named parameters can be assigned values and
attributes by using the typeset special command. The attributes
supported by the shell are described later with the typeset
special command. Exported parameters pass values and attributes
An internal integer representation of a named parameter can be
specified with the -i option of the typeset special command.
Arithmetic evaluation is performed on the value of each
assignment to a named parameter with the -i attribute. If an
arithmetic base is not specified, the first assignment to the
parameter determines the arithmetic base. This base is used when
parameter substitution occurs.
caller. Ordinarily, variables are shared between the calling
program and the function. However, the typeset special command
used within a function defines local variables whose scope
includes the current function and all functions it calls.
The special command return is used to return from function calls.
Errors within functions return control to the caller.
Function identifiers can be listed with the -f or +f option of
the typeset special command. The text of functions are also
listed with -f. Functions can be undefined with the -f option of
the unset special command.
Ordinarily, functions are unset when the shell executes a shell
script. The -xf option of the typeset command allows a function to be global (exported)
|
|
|