Have you read the "Function" command section in the kix2001.doc file? That sums it up pretty well.

You could also look at some of the UDF's posted here and / or in http://www.scriptlogic.com/Kixtart/FunctionList.asp

Beyond that, just create a small script and a simple function like (untested code):

code:
function LastFirst ($strName)
; $strName is assumed to be a string with first
; middle (optional) and last names, and no
; punctuation, titles, or Jr, Sr, etc.
dim $Tmp, $Name, $i, $j
$Tmp = split($strName,' ')
$j = UBound($Tmp)
$LastFirst=$Tmp[$j]
$LastFirst=$LastFirst + ','
for $i = 0 TO ($j - 1)
$LastFirst=$LastFirst + ' '
$LastFirst=$LastFirst + $Tmp[$i]
next
endfunction

Silly example, but it would be something easy to play with. Just put that code into a text file. Then anywhere outside the function/endfunction boundaries, you could put:

code:
LastFirst('First MI. Last') ?

Run the script, and play with it until you are comfortable with how functions work. Maybe you could add an optional parameter to include a title.

New Mexico Mark