home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- FUNCTION DECODE (in_string)
- *****************************************************************
-
- * Decodes a string encoded by ENCODE
-
- * Copyright(c) 1991 -- James Occhiogrosso
-
- # define ADJVAL 30
-
- LOCAL counter := in_len := 0, out_string := ''
-
- IF in_string != NIL
-
- * Trim passed string
- in_string := ALLTRIM(in_string)
- in_len := LEN(in_string)
-
- * Get ASCII value of each position and restore original value
- FOR counter = 1 TO in_len
- out_string := out_string + ;
- CHR((ASC(SUBSTR(in_string, counter * -1, 1)) /2) - ADJVAL)
- NEXT
-
- ENDIF
-
- RETURN out_string
-
-
-