* $Id: basename.sno,v 1.2 2015-01-02 02:13:50 phil Exp $
* Phil Budne (idea from Phillip Thomas) January 2015
-INCLUDE 'host.sno'
* return trailing element separated by character SEP
* (SEP defaults to system directory path separator)
	DEFINE("BASENAME(X,SEP)")		:(BASENAME.END)
BASENAME
	SEP = IDENT(SEP) HOST(HOST_DIR_SEP)
	X = REVERSE(X) SEP
	X POS(0) SPAN(SEP) =
	X POS(0) BREAK(SEP) . BASENAME
	BASENAME = REVERSE(BASENAME)		:(RETURN)
BASENAME.END
