Hi CADMan,

On the line to which you referred, I am passing the necessary arguments (or parameters) to the subfunction called 'LM:StringSubst'. My subfunction takes three arguments: 'new', 'old' and 'string' which represent respectively the new string to be substituted, the pattern string to be matched and replaced, and the string in which to do the replacing. When the subfunction is called, the symbols 'new', 'old' and 'string' will hold the argument data passed to the subfunction.

Think of the subfunction as just another LISP function. For example, I'm sure you are familiar with the LISP function '+'. This function takes one or more numerical arguments and proceeds to add them together and return the sum:

`(+ arg1 arg2 ... argN)`

Returns: arg1 + arg2 + ... + argN

But, say we wish to have a function that will return the supplied argument plus 2, we could define such a function in the following way:

`(defun Add2 ( x ) (+ x 2))`

Now, the above function takes a single numerical argument, denoted by the symbol 'x', and returns that supplied number incremented by 2. Just as we called the '+' function, we would call our subfunction in the following way:

`(Add2 5)`

Returns: 7

Hence in my example, I call the function 'LM:StringSubst' with the required arguments:

`(LM:StringSubst " " "\\P" str)`

Returns: the value of the variable 'str' with "\\P" substituted for " "

Lee