basic.%chdir

C Function/BASIC Program, Releases: AP/Unix

Changes the current directory.

Syntax

variable=%chdir(string)

Description

changes the current directory to the directory specified by 'string'.

A '-1' (minus one) returned from this function indicates an error condition.

Example

if %chdir('/usr/pick') = -1 then crt 'errno=':system(0)
If an error condition is encountered in this example, the error message is
displayed from function 'system(0)'.

See Also

Command Name Type Description
basic.cfunc Definition can be called from a Pick/BASIC program or subroutine in AP/DOS and AP/Unix implementations using a syntax similar to that of normal C.
basic.cfunction Definition Declare a list of C functions.
tcl.cd Verb: Access Change directory.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.