reverse, vreverse

Declaration

cstring function reverse(cstring S)

varchar function vreverse(varchar S)

Description

reverse, vreverse reverses the characters in string S so that the first char in S becomes the last.

Example Stored Procedure

CREATE PROCEDURE test_vreverse(s varchar(30))

RETURNS (result char(30)) AS

BEGIN

result = vreverse(s);

END!!

WISQL - calling the example stored procedure

execute procedure test_vreverse("abcdef");

RESULT

==============================

fedcba