CAP once more

From: H. v. L. <"H.>
Date: Fri, 17 Sep 2004 16:57:52 +0200

----boundary-LibPST-iamunique-1305453747_-_-
Content-type: text/plain

One of the essential points with a procedure like CAP is, as was stated,
speed.
But then, if this really was the main point when implementing CAP, I can't
understand the output of the following module

MODULE PrivCapTest;

        IMPORT
                Strings, In, Out;

        PROCEDURE Do*;
                VAR
                        ch, CH: CHAR;
                        i: INTEGER;
        BEGIN
                FOR i := ORD(MIN(CHAR)) TO ORD(MAX(SHORTCHAR)) DO
                        ch := CHR(i);
                        Out.Ln;
                        Out.String("CAP(CHR(");
                        Out.Int(i,0);
                        Out.String(")) = ");
                        Out.String("CAP(");
                        Out.Char(ch);
                        Out.String(") = ");
                        Out.Char(CAP(ch));
                        IF ch = CAP(ch) THEN
                                Out.String(") = ");
                                Out.Char(ch);
                        END;
                END;
        END Do;

END PrivCapTest.

When you look at the output you will remark quite a lot of characters (of
different gender, i. e. 'letter' and non 'letter') being mapped onto
themselves whereas others of similar gender are not. So, if despite of
speed it is possible to do this mapping why isn't it possible in the rest
of the non sense cases resulting an intuitively understandable and at the
same time foolproof function?

Regards

H. v. Lavergne
--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-1305453747_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBc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