Why do programmers use result[LEN(result),1]? Doesn't result[1] do the same thing but easier, quicker, and more readable?
Thanks, David A. Green DAG Consulting www.dagconsulting.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Symeon Breen Sent: Friday, August 25, 2006 1:06 AM To: [email protected] Subject: Re: [U2] Encrypt issue 8088 Here is my standard crypt sub FUNCTION AD.CRYPT(Word,key,iv) * Function to crypt something i.e. a password * a2c limited, Oct2005 Crypt=Word Err='';result='';resLoc=1;salt='' algorithm="rc2-cbc" Err=ENCRYPT(algorithm,2,Word,1,key,1,1,salt,iv,result,resLoc) IF NOT(Err) THEN IF result[LEN(result),1]=CHAR(10) THEN result=result[1,LEN(result)-1] ;* IBM ISSUE 8088 Crypt=result END RETURN Crypt ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
