# A-Shell Extensions
> [HTML Version](a-shellextensions.htm)
In addition to the AlphaBASIC and BASIC_plus_ statements, A-Shell also supports a set of statements which are only available under A-Shell—i.e., are not part of the AlphaBASIC environment. These statements are listed in the table below, and are referred to as the A-Shell Extensions. To invoke these extensions, use:
• /X:2 to create a standard .RUN file
• /X:3 to create an .SBX file
Note that /X:3 does not disturb an existing .RUN, so it is possible to compile the same source into both a .RUN and a .SBX, as follows:
.COMPIL MYPROG/X:2 ; create MYPROG.RUN
.COMPIL MYPROG/X:3 ; create MYPROG.SBX
The /RC ([Run Compatible](runtimecompatible.htm.md)) on COMPIL, when used in place of the /X:1 or /X:2 switch, allows many of these extensions to be compiled into a RUN format that remains compatible with AMOS. In the following table, the "/RC?" column says whether, when compiling with the RC switch, use of this statement or feature will produce a run file that is run compatible ("RC") with AMOS.
| **Extension** | **/RC?** | **Meaning** |
|------|------|------|
| 3D Print Tab | Note 1 | Tab(x,y,z). See [Three-D Print Tab](three-dprinttab_ref.htm.md). |
| [Call Stack Tracing](call_stack_tracing.htm.md) | | |
| Comment | Yes | Comment may follow an \& on a continuation line |
| [COMPILER\_VERSION Macro](compiler_version_macro.htm.md) | | |
| [Conditional Compilation](conditionalcompilation.htm.md) | Yes | |
| DEBUG | | Control variable. If /DEBUG compile switch specified, acts as if it equals 1, otherwise 0. If /DEBUG switch is not specified, then it may still be activated at runtime by using SET DEBUG, or MX\_DEBUG. Note that for backwards compatibility, mapping DEBUG explicitly as an ordinary variable will disable the control variable DEBUG. See Note 3 below. |
| DEBUG statements | Yes | See [DEBUG Statements](debug-statements.htm.md). |
| [DEFSTRUCT](defstruct.htm.md) | Yes | Allows you to assign a type name to a set of MAP statements and then use that as if it was a data type. |
| DIMX | Note 4 | Enhanced dynamic array allocation. See [Dynamic Arrays (DIMX)](dynamic_arrays_(dimx).htm.md). |
| [Dot Variables](dotvariables.htm.md) | | Read-only system variables. |
| DPRINT | Note 2 | Creates a static text control using the current default GUI (proportional) font and with the sunken attribute. Note that if the /X:2 switch not specified, TPRINT is compiled as PRINT. Intended for displaying data fields. See [PRINT Statement](printstatement.htm.md). |
| Dynamic variables | | [Dynamically Sized Variables](dynamically-sized_variables.htm.md). |
| [ELSEIF Clauses](elseifclauses.htm.md) | Yes | One or more ELSEIF clauses may be inserted into an extended IF/ELSEIF/ELSE/ENDIF statement. |
| EPRINT | | Embeds the output fields in edit boxes; is typically used for displaying editable data fields. See PRINT. |
| [++ERROR](error_compiler.htm.md) | Yes | Causes the message to be displayed and is treated as a compiler error. This is particularly useful in conjunction with conditional compilation, as shown in the preceding example. |
| [INPUT CSV](inputcsv.htm.md) | | Input comma separated values |
| [INSTR()](instr().htm.md) | | When the fourth parameter (flags) is specified (even if 0), the pattern is treated as a regular expression. |
| [ISAM File Statements](isamstatements.htm.md) | | |
| Line length | Yes | Maximum source line length of 3070 instead of 512. |
| [MAP Statement](variablescope.htm.md) | | PRIVATE and PUBLIC keywords for fine tuning scope of variables (MAP or DIMX). |
| [++MESSAGE](message_compiler.htm.md) | | Equivalent to [++ERROR](error_compiler.htm.md) except that no error is generated. |
| [Nested ++INCLUDEs](nestedincludes.htm.md) | Yes | Nesting to 13 levels deep |
| [PAD()](pad().htm.md) | | Pad a string with spaces |
| [++PRAGMAs](pragmas.htm.md) | Yes | [Compiler Directives](readforisam-a.htm.md). |
| [Procedures](procedures.htm.md) | | |
| [REDIMX](redimx.htm.md) | | Re-dimensions an array originally created with [Dynamic Arrays (DIMX)](dynamic_arrays_(dimx).htm.md). |
| Return | | Return value from [XFUNC()](xfunc().htm.md). |
| [Shortcut Operators](shortcutoperators.htm.md) | Yes | |
| [Three-D Print Tab](three-dprinttab_ref.htm.md) | Note 1 | Tab(x,y,z). |
| TPRINT | Note 2 | Same as DPRINT but without the sunken effect. Also note that SET AUTOTPRINT causes all PRINT statements to behave at runtime as if they were compiled as TPRINT. See [PRINT Statement](printstatement.htm.md). |
| [TRACE Statements](trace_statements.htm.md) | Note 3 | These statements open, print to, and close the System Messages window. |
| Underlines in variable names | Yes | Variable names (and constants) may contain underlines. Although this has no special meaning, by convention it is used primarily with constants. |
| [Dynamic Structure Functions](dynamicstructurefunctions.htm.md) | | |
| [WRITECD](writecd.htm.md) | | Output comma delimited values |
| WRITETD | | **Deprecated**; see [WRITECD](writecd.htm.md) for important note. Old documentation: same as WRITECD, except that it outputs Tab delimiters instead of comma delimiters. |
| UNDEF | Yes | Causes the specified symbol to be undefined, allowing it to be redefined or to fail a ++IFDEF symbol test. |
| [XFUNC()](xfunc().htm.md) | | Call an external (SBX) function |
| XGETARG | | Retrieve subroutine parameters. See [X-ARGs](xgetarg_xgetargs.htm.md). |
| XGETARGS | | Retrieve subroutine parameters. See [X-ARGs](xgetarg_xgetargs.htm.md). |
| XPUTARG | | Return subroutine parameters. See [X-ARGs](xgetarg_xgetargs.htm.md). |
| XREAD | | Allow record access via explicit record numbers. See [XREAD, XWRITE, XUNLOKR](xreadxwritexunlokr.htm.md). |
| XWRITE | | Allow record access via explicit record numbers. See [XREAD, XWRITE, XUNLOKR](xreadxwritexunlokr.htm.md). |
**Notes**
1: Compiler ignores "z" value.
2: DPRINT / EPRINT / TPRINT are compiled as if PRINT.
3: TRACE.xxxx / DEBUG.xxxx are compiled as XCALL EVTWIN; need to supply AMOS implementation.
4: Statement will be compiled if OPTIONS=RC\_DIMX in miame.ini; however, the runtime token is not AMOS-compatible, so you must have other runtime logic to detect AMOS and avoid the statement.