View Raw SPL
/*****************************************************************************
* *
* RESETSPLPATH.SPL Copyright (C) 2017 DSP Development Corporation *
* All Rights Reserved *
* *
* Author: Randy Race *
* *
* Synopsis: Resets the SPL search path *
* *
* Revisions: 25 Oct 2017 RRR Creation *
* *
*****************************************************************************/
#if @HELP_RESETSPLPATH
RESETSPLPATH
Purpose: Resets the SPL search path to the startup default.
Syntax: RESETSPLPATH()
Returns: A string, the new full SPL search path.
Example:
path = getmiscpath(1, 7) + "mypath";
mkdir(path);
copyfile("readme.txt", path + "\newreadme.txt");
addsplpath(path);
p1 = which("newreadme.txt", 0);
resetsplpath();
p2 = which("newreadme.txt", 0);
Creates a folder named "mypath" within the user
"Documents and Settings" folder and copies the "readme.txt" file
to the folder as "newreadme.txt". The folder is added to the
SPL search path.
WHICH locates "newreadme.txt" on the augmented search path and
assigns the containing folder name to variable p1.
RESETSPLPATH removes the added custom path component.
WHICH does not locate "newreadme.txt" and assigns an empty string
to variable p2.
Remarks:
The SPL search path is searched for SPL functions, modules
and user menus. RESETSPLPATH removes any added path components
and resets the SPL search path to the startup default.
See ADDSPLPATH to add custom paths to the SPL search path.
See Also:
ADDSPLPATH
GETMISCPATH
GETSPLPATH
#endif
/* reset user SPL path additions */
resetsplpath()
{
local path;
path = setsplpath("");
return(path);
}