chdir#

Purpose#

Changes working directory in interactive mode.

Format#

chdir dirstr
Parameters:

dirstr (literal or ^string) – directory to change to.

Examples#

Example with literal#

If your current working directory is C:\gauss\time-series and you enter:

chdir examples;

Then chdir will change your current working directory to C:\gauss\time-series\examples.

Example with string#

If your current working directory is C:\gauss\time-series and you enter:

dir = "examples";

// The ^ operator tells GAUSS to use
// the contents of the string
chdir ^dir;

Then chdir will change your current working directory to C:\gauss\time-series\examples.

Remarks#

This is for interactive use. Use ChangeDir() in a program.

If the directory change fails, chdir prints an error message.

See also

changedir(), cdir()