.TH typeset "" "" Command
.PC "Set/list variables and their attributes"
\fBtypeset\fR
\fBtypeset [+-]fr
\fBtypeset [ irx ] \fIvariable\fB=\fIvalue\fR
.PP
.HS
.Pp
\fIFirst form:\fR
List all variables and their attributes
.SH "Second form:"
.IC "\fB+f\fR"
List functions
.IC "\fB-f\fR"
List functions plus values
.IC "\fB+r\fR"
List read-only variables
.IC "\fB-r\fR"
List read-only variables plus values
.Pp
\fIThird form:\fR
Set \fIvariable\fR to equal \fIvalue\fR
.IC "\fBi\fR"
Store \fIvalue\fR as an integer
.IC "\fBr\fR"
List read-only variables
.IC "\fBx\fR"
Export \fIvariable=fR to environment
.Pp
\fBksh\fR only.
.HE
The command
.B typeset
is built into the Korn shell
.BR ksh .
It sets or lists all variables and their attributes.
.PP
When called with an argument of the form \fIvariable\fB=\fIvalue\fR,
it sets variable
.I variable
to
.I value.
The following options modify
.I variable
or
.IR value :
.DS
	\fBi\fR	Store \fIvalue\fR as an integer
	\fBr\fR	Make \fIvariable read-only
	\fBx\fR	Export \fIvariable\fR to the environment
.DE
.PP
When called without an argument,
.B typeset
lists all variables and their attributes.
When called with one of the following options, it lists the variables of
the appropriate type.
When prefixed with a hyphen `-', it prints the variable plus its value;
when prefixed with a plus sign `+', it prints the variable alone:
.DS
	\fBf\fR	List functions instead of variables
	\fBr\fR	List read-only variables
.DE
.PP
.SH "See Also"
.Xr "commands," commands
.Xr "ksh" ksh
