# Directives

DEF .... |

The DEF directive has a variety of formats that allow for the definition of objects, functions, and other system values.

## Formats

Use the links below to access additional information for a specific format:

Format | Description
DEF ARG(nn) = string$ | Use the DEF ARG to change the value associated with an ARG for the duration of the session.
DEF CLASS class$... | Use the DEF CLASS directive in Object Oriented Programming (OOP) to declare the start of an object definition. It defines the name of the object, and it can be used to override object creation and deletion logic.
DEF [ CTL | ERR | LFO | LFA ] =numval | Use these DEF directives to set the values for various system numeric variables. (The DEF CTL/ERR/LFO/LFA directives were added in PxPlus v7.00.)
DEF [ LPG | HWD | NID ] =strval | Use these DEF directives to set the values for various system string variables. (The DEF LPG/HWD directives were added in PxPlus v8.11, build 9182.) (The DEF NID directive was added in PxPlus v8.30, build 9190.)
DEF [ CVS | DTE | LCS | UCS ] (new_table$) | Use these DEF directives to define new system tables for Accent Conversion, Date, Lowercase and Uppercase.
DEF ENV (name$) = value$ | Use the DEF ENV directive to add, change or delete environment variables from the current process and any subsequent spawned process. (The DEF ENV directive was added in PxPlus 2024.)
DEF FN var$(arglist) ... | Use the DEF FN directive to define single- or multi-line functions.
DEF GID =groupID DEF UID =userID | Use the DEF GID= and DEF UID = directives to override the effective UNIX/Linux user or group ID of a session, if OS security allows it.
DEF MSG (msg_text$) | Use the DEF MSG directive allows you to change system messages on the fly.
DEF NAR =value | Use the DEF NAR directive to reduce the number of arguments that a program sees. (The DEF NAR directive was added in PxPlus 2017.)
DEF OBJECT... | Use the DEF OBJECT directive is used to create a new instance of a specified COM object.