Progress
Language Reference


ENCODE Function

Interfaces
OS
SpeedScript
All
All
Yes

Encodes a source character string and returns the encoded character string result.

SYNTAX

ENCODE ( expression ) 

expression

An expression that results in a character string value. If you use a constant, you must enclose it in quotation marks (" ").

EXAMPLE

This procedure uses the ENCODE function to disguise a password that the user enters. The procedure then displays the encoded password.

r-encode.p
DEFINE VARIABLE password AS CHARACTER FORMAT "x(16)".
DEFINE VARIABLE id AS CHARACTER FORMAT "x(12)".
DEFINE VARIABLE n-coded-p-wrd AS CHARACTER FORMAT "x(16)".

SET id LABEL "Enter user id" password LABEL
  "Enter password" BLANK WITH CENTERED SIDE-LABELS.

n-coded-p-wrd = ENCODE(password).
DISPLAY n-coded-p-wrd LABEL "Encoded password". 

NOTES


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095