' REVERSE$(0.0)  Reverse Character String              03/17/1997-03/17/1997
' --------------------------------------------------------------------------
' Copyright (C) 1997 by Vladimir Veytsel                       www.davar.net

' Type ---------------------------------------------------------------------

'    Function

' Declaration --------------------------------------------------------------

'    DECLARE FUNCTION REVERSE$(Strng$)

' Parameter ----------------------------------------------------------------

'    Strng$  - Character string to be reversed

' Value --------------------------------------------------------------------

'    Character string of the same length as parameter string
'    with characters in reverse order.

' Examples -----------------------------------------------------------------

'    REVERSE$("")   =""
'    REVERSE$("A")  ="A"
'    REVERSE$("AB") ="BA"
'    REVERSE$("ABC")="CBA"

' Start Function

     FUNCTION REVERSE$(Strng$) PUBLIC

' Form and Return Function Value to the Point of Invocation ----------------

     FOR I=LEN(Strng$) TO 1 STEP -1
         Target$=Target$+MID$(Strng$,I,1)
     NEXT I
     REVERSE$=Target$

' Finish Function ----------------------------------------------------------

     END FUNCTION
