# System-Defined Functions > [HTML Version](system-defined-functions.htm) __ The following sections of the documentation show A-Shell's various functions grouped by category—String Functions, Trig Functions, etc. Below is a table showing all of the functions in alphabetical order. Note that although all functions require a parenthesized argument list (even if empty), the function names themselves are effectively ASB Keywords in that they cannot be used as variable names. | | | | |------|------|------| | **Name** | **Description** | **Type/Category** | | ABS(x) | Returns absolute value of x. | Numeric | | ACS(x) | Arccosine of x. | Trigonometric | | [.ARG\_PASSED()](arg_passed().htm.md) | Indicates whether the specified argument was passed to the current SBX, function, or procedure. | Other / Misc | | [.ARGSIZ()](otherfunctions.htm.md) | Returns the size of the specified argument passed to the current SBX, function, or procedure. | Other / Misc | | [.ARGTYP()](otherfunctions.htm.md) | Returns the type of the specified argument passed to the current SBX, function, or procedure. | Other / Misc | | [.ARGTYP\_READONLY()](argtype_readonly.htm.md) | Indicates whether the specified argument is read-only. | Other / Misc | | ASC(a\$) | Returns the numeric value of the first character of a\$. | String | | ASN(x) | Arcsine of x. | Trigonometric | | ATN(x) | Arctangent of x. | Trigonometric | | [AUTOCAP\$(a\$)](string_functions.htm.md) | Intelligently capitalizes a specified string. | String | | .BEFORE() | Specify insertion position in [MLIST](multi-level_list_mlist.htm.md). | | | CHR\$(x) | Returns the OEM or Latin1 character of specified character. | String | | COS(x) | Cosine of x. | Trigonometric | | DATN(y,x) | Double arctangent. | Trigonometric | | [.DYNOFFSET()](dynoffset().htm.md) | Indirect deferred version. | Dynamic Structure | | [.DYNOFFSIZ()](dynoffsize().htm.md) | Dynamic structure version of .OFFSIZ\$(). | Dynamic Structure | | [EDIT\$()](edit$().htm.md) | Returns a modified version of a string based on specified options. | String | | [EOF()](filefunctions.htm.md) | Returns end-of-file status for a file channel. | File | | [ERF()](filefunctions.htm.md) | Returns error/status information about the last operation on an ISAM file. | File | | [ERR()](err_system_def.htm.md) | Used within an error trap to return information relating to a ASB error that has occurred. | Other / Misc | | [ERRMSG()](otherfunctions.htm.md) | Returns the message associated with ASB error x. | Other / Misc | | EXP(x) | Returns the constant e raised to the power x. | Numeric | | [.EXTENT()](extent().htm.md) | Returns the "extent" of the specified array or collection. | Other / Misc | | FACT(x) | Returns the factorial of x. | Numeric | | [FILL\$()](fill$().htm.md) | Returns a string consisting of a string repeated until it reaches specified length. | String | | FIX(x) | Returns the integer part of the floating point value x. | Numeric | | [.FSTAT()](filefunctions.htm.md) | Returns the file status for the last ISAM-A operation on a specified channel. | File | | [GETKEY()](getkey().htm.md) | Inputs and returns the ASCII decimal value of a single character. | Input | | [IFE(), IFE\$()](ife()andife$().htm.md) | Ternary function; returns one of two parameters based on value of first. | String / Numeric | | [IFELSE(), IFELSE\$()](ifelseandifelse$().htm.md) | Ternary function; returns one of two parameters based on condition. | String / Numeric | | [INSTR()](instr().htm.md) | Returns position of first occurrence of a specified string. | String | | [.INSTRR()](instrr().htm.md) | Same as INSTR() but works in reverse direction. | String | | INT(x) | Returns the largest integer less than or equal to x. | Numeric | | [.ISBOUND()](dynamicstructurefunctions.htm.md) | Returns TRUE if the specified variable is a DYNSTRUCT that has been bound to a defined structure. | Dynamic Structure | | [.ISDEF()](isdef.htm.md) | Indirect deferred version. | Dynamic Structure | | [.ISEMPTY()](arg_passed().htm.md) | Returns yes/no if the string or unformatted expression is "empty. | String | | [.ISNULL()](specialordmapfunctions.htm.md) | Tests for the .NULL condition. | Other | | [.KEY()](specialordmapfunctions.htm.md) | Returns the key associated with the element currently indexed by the iterator. | Other | | LCS\$(a\$) | Returns string a\$ folded to lower case. | String | | [LEFT\$()](string_functions.htm.md) | Returns leftmost x characters of string a\$. | String | | [LEN()](string_functions.htm.md) | Returns length of string a\$. | String / Numeric | | [.LINENO()](lineno()_pageno().htm.md) | Returns current line number for sequential output files. | File | | LOG(x) | Returns the natural (base e) log of x. | Numeric | | LOG10(x) | Returns the decimal logarithm of x. | Numeric | | [LOOKUP()](filefunctions.htm.md) | Returns the size of the specified file in blocks. | File | | LSTRIP\$(a\$) | Returns the string a\$ with the leading blanks and TABs removed. . | String | | [MEM()](otherfunctions.htm.md) | Returns information about available memory and resources. | Other | | MID\$(a\$,x,y) | Returns substring of a\$, starting in position x and extending y characters or until end. | String | | [NUMEXPR()](numexpr().htm.md) | Treats expression as numeric. | String / Numeric | | [.NEXT()](specialordmapfunctions.htm.md) | Advances the iterator, returning the associated key or .null if no more. | Other | | [ODTIM\$()](odtim().htm.md) | Outputs the specified date and/or time according to the formatting flags. | String | | [.OFFSET()](offset().htm.md) | Returns the offset to the specified member variable within the specified structure. | Compiler | | [.OFFSIZ\$()](offsiz$().htm.md) | Returns the combination of the specified structure member's offset and size. | Compiler | | [PAD\$()](pad().htm.md) | Returns string truncated, or padded with trailing blanks, to the specified length. | String | | [.PAGENO()](lineno()_pageno().htm.md) | Returns current page number for sequential output files. | File | | [PYFUNC()](pyfunc().htm.md) | Provides a means to call an external function written in Python version 3. | Other / Misc | | [.RECNO()](filefunctions.htm.md) | Returns the current record number for the specified random, ISAM, or ISAM-A file channel. | File | | [.RECSIZ()](filefunctions.htm.md) | Returns the record size for the specified open file channel. | File | | .REF() | Return a reference to iterator location in [MLIST](multi-level_list_mlist.htm.md). | | | RIGHT\$(a\$,x) | Returns the rightmost x characters of string a\$. Equivalent to a\$\[-x,-1\]. | String | | [RND(x)](randomnumbergenerators.htm.md) | Returns a random number. | Numeric | | [RND2()](randomnumbergenerators.htm.md) | Enhanced version of RND(x). | Numeric | | RTRIM\$(a\$) | Returns string a\$ with trailing spaces removed. | String | | SGN(x) | Returns the sign of x: -1 if x < 0, 0 if x = 0, 1 if x > 0. | Numeric | | SIN(x) | Sine of x. | Trigonometric | | [.SIZEOF()](sizeof().htm.md) | Evaluates at compile-time to the size in bytes of the specified variable or defined structure. | Compiler | | SPACE\$(x) | Returns a string of x spaces. | String | | SQR(x) | Returns the square root of x. | Numeric | | [SRND2()](randomnumbergenerators.htm.md) | Initializes the RND2() random number generator. | Numeric | | [STR\$()](str$().htm.md) | Converts a numeric value or expression to string. . | String | | [STREXPR\$()](strexpr$().htm.md) | Treats the expression argument as a string. | String | | STRIP\$(a\$) | Returns the string a\$ with the trailing spaces and tabs removed. | String | | TAN(x) | Tangent of x. | Trigonometric | | [TRIM\$(a\$)](string_functions.htm.md) | Returns the string a\$ with the leading spaces and tabs removed. | String | | UCS\$(a\$) | Returns string a\$ folded to upper case. | String | | [VAL()](val()andval$().htm.md), [VAL\$()](val()andval$().htm.md) | Returns the decimal value of a string. | String / Numeric | | [.VALX()](val()andval$().htm.md) | Extended version of VAL. | String | | [XFUNC(), XFUNC\$()](xfunc().htm.md) | Executes an external SBX routine. | Other / Misc |