
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FORCE Data Base Compiler - ##############################################################################
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
##############################################################################
###+----------+###############################################################
#+-| CURDIR() |-----------------------------------+###########################
#| +----------+ Returns the current DOS directory |###########################
#+------------------------------------------------+###########################
##############################################################################
##############################################################################
#+--| Summary |----------------+##############################################
#| #INCLUDE system.hdr |##############################################
#+-----------------------------+##############################################
##############################################################################
##############################################################################
#+--| Syntax |----------------------------+###################################
#| FUNCTION CHAR curdir PROTOTYPE |###################################
#| PARAMETERS VALUE UINT drive |###################################
#+----------------------------------------+###################################
##############################################################################
##############################################################################
##########+---| Description |--------------------------------------+##########
##########| The curdir() function returns the current directory as |##########
##########| defined by DOS. drive specifies the drive number ( 0 |##########
##########| for default, 1 for drive A:, etc.). |##########
##########| ------------------------------------------------------ |##########
##########| The returned directory name does not contain the drive |##########
##########| specification. The first character of the string is a |##########
##########| backslash. |##########
##########+--------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Get the current working directory on the |#########
#########| * default drive. |#########
#########| |#########
#########| ? curdir( 0 ) |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Print full path to filename |#########
#########| |#########
#########| ? chr( curdrive() + 'A' ) + ":"+ curdir() |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 3 |-------------------------------------------+#########
#########| * Get the subdirectory name |#########
#########| |#########
#########| ? substr( curdir(0), rat("\",curdir(0))+1 ),255) |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also: curdrive() SET DEFAULT TO
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson