Inverse of CHAR function

Deskin, Bob Bob.Deskin@Cognos.COM
Fri, 28 Jan 2000 06:33:14 -0500


I tell you, everyone asks for examples and when you provide them, people
want them to work and make sense too :-)

Actually this is a good point Chris. I'll forward this to the documentation
people for the next upgrade.

As for the reverse of CHARACTERS, I've been asking for this since the early
days, but it never seems to make the cut. It's still on the list.

Bob Deskin              
PowerHouse Web Product Manager and Senior Product Advisor
Application Development Tools, Cognos Inc.
bob.deskin@cognos.com
(613) 738-1338 ext 4205  FAX: (613) 228-3149
3755 Riverside Drive P.O. Box 9707 Stn. T, Ottawa ON K1G 4K9 CANADA


-----Original Message-----
From: Chris Sharman [mailto:Chris.Sharman@ccagroup.co.uk]
Sent: January 28, 2000 3:51 AM
To: jlkeepers@mmm.com
Cc: Chris.Sharman@ccagroup.co.uk; powerh-l@lists.swau.edu
Subject: RE: Inverse of CHAR function



>Last question of the day:
>
>Does anyone know what function is the inverse of the CHAR function?  IE.
>function x("A")=65.

A fine question.
Don't use the CHARACTERS function as per the example in the docs:

define itemx char*20 = encrypt(characters(phone),"INDEX")

They carefully leave the recovery of 'phone' as an exercise for the reader,
and
a very challenging exercise it is too, since there is no inverse CHAR
function
available ...

Techniques available (all with limitations) are:

3GL call (from Quick).
INDEX function (ie INDEX("ABCDEFGHIJKLMNOPQRSTUVWXYZ",ch)+64 )
Redefinition in the dictionary.

Good luck,
Chris
_______________________________________________________________________
Chris.Sharman@CCAgroup.co.uk		http://www.ccastat.demon.co.uk/
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.