DIR() Function - Get Default Disk Directory

Syntax

DIR(disk{,ERR=lineref})

Description

The DIR() function returns the default directory for the specified disk.

Parameter

Description

disk

A valid disk. If this parameter evaluates to an integer value, it is assumed to refer to a disk equal to the integer added to the character "A." If this parameter specifies a string, no modifications are performed. A string argument with a 0 length assumes the current disk.

ERR=lineref

Branch to be taken if an error occurs during execution.

The returned string contains the full path name, without the specified disk. A "/" character is always appended to the directory name.

Examples

>LET DIR1$=DIR(2),DIR2$=DIR("C")
>PRINT DIR1$
/USRDIR/
>PRINT DIR2$
/USRDIR/
>PRINT DIR("")
/BASIS/PRO/5/

See Also

Functions - Alphabetical Listing