# pathsep

Displays or sets the character used to separate directories in the path.

## Syntax

R = pathsep()

R = pathsep(newsep)

## Inputs

newsep
If nargin is 0, the current character used to separate directories is returned.
If nargin is 1, the argument must be a single character. This new character will be used to separate characters in the path.
The original path separation character is returned.
Type: char

## Outputs

R
When nargin is 0, the current character used to separate directories in the path is returned.
If nargin is 1, the original character used to separate characters in the path is returned.
Type: char

## Example

printf('\nshow the original path separator character\n')
pathsep()

printf('\n\nshow the path using this separator character\n')
R = path()

printf('\n\nset the path separator to a new character, returns the original character\n')
pathsep('*')

printf('\n\nshow the path using the new separator character\n')
R = path()
show the original path separator character
ans = ;

show the path using this separator character
R = C:/Program Files/Example/scripts;C:/Program Files/Example/scripts/oml

set the path separator to a new character, returns the original character
ans = ;

show the path using the new separator character
R = C:/Program Files/Example/scripts*C:/Program Files/Example/scripts/oml