Marianne,
See www.asciitable.com for the ASCII characters table.
Control characters, as you can see from the ASCII table, are defined at the front (values 0-31). Printable characters are basically defined between 32 and 126. Values 127 to 255 are other special characters and accented characters.
Assuming the character is a lowercase letter, I believe this is intended to upshift it. It's hard to tell without the context where the Compute is used (variable definitions, Cobol statements before/after).
HTH
François
-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On Behalf Of ianne
Sent: Friday, May 30, 2008 5:48 AM
To: [log in to unmask]
Subject: [HP3000-L] Cobol - Ordinal Position/Control Character
Hi everyone,
In a COBOL program, if I have this line:
compute var = function ord(<certain char>) - 161
what does it actually compute?
Also, if you happen to know too. Given that's how to compute a certain
character (above equation), would you know the range of integer of control
characters? Or even just the ordinal position of all control characters [function
ord()]?
Thanks a lot! =)
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
Remarque - Cette transmission est pour l'usage exclusif du ou des destinataires indiqués et peut contenir de l'information confidentielle ou protégée. Si vous n'êtes pas le destinataire indiqué, veuillez supprimer cette transmission ainsi que tout fichier joint et aviser l'expéditeur par courriel immédiatement. Toute révision, utilisation, divulgation ou distribution non autorisée est interdite.
Notice: This transmission is for the sole use of the intended recipient(s) and may contain information that is confidential and/or privileged. If you are not the intended recipient, please delete this transmission and any attachments and notify the sender by return email immediately. Any unauthorized review, use, disclosure or distribution is prohibited.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|