- Character Translation to Unicode

From: Douglas G. Danforth <"Douglas>
Date: Wed, 26 Oct 2005 13:43:42 -0400


Helmut,
Perhaps we are all in a state of shock since CHAR is implemented as 16 bits and is supposed to support Unicode.
""

-Doug

Zinn, Helmut wrote:

        Hi Chris,
        
        I see, P20 is for a different application area (scope).
        
        Standard Pascal hasn't Units. It doesn't need any name translation.
        Standard Pascal uses ASCII character set only. It doesn't need character
        translation.
        
        I looked from the view of my very old Turbo Pascal programs. There are both
        topics very important.
        
        Currently my biggest drawback in Component Pascal is: I can't use Unicode in
        string constant (ARRAY OF CHAR) and I can't use Unicode characters inside
        forms!!! I wrote a email about this topic to the mailing list ("A Cookbook
        question: How to use Unicode inside BlackBox programs?"). There is no
        response. Nobody is interested in such question. Am I the only one who have
        trouble with Unicode?
        
        I look forward to see P20 on CPC.
        
        Regards
        
        Helmut
        
        -----Ursprüngliche Nachricht-----
        Von: blackbox{([at]})nowhere.xy
        Software
        Gesendet: Dienstag, 25. Oktober 2005 03:27
        An: blackbox{([at]})nowhere.xy
        Betreff: [BlackBox] - Pascal to Component Pascal translator & Name
        Translation & Character Translation to Unicode
        
        
          

                From: blackbox{([at]})nowhere.xy
                Behalf Of collection
                Sent: Saturday, 22 October 2005 4:50 PM

                    

        
        Hi Helmut,
        
        Thank you for your feedback.
        
          

                it is a typical Benchmark problem that some relevant topics
                are not compared.

                    

        
        True - it only claims to highlight what P2O does which Tp2cp doesn't -
        not vice versa. Since then I have extended it to convert more WITH
        statements. The WITH variable can now be any simple global variable, or
        local variable (including parameters). Also, nested WITHs of the form
        'WITH v1, v2, ... DO' are handled correctly. What it doesn't do is
        handle with statements involving elements of structured variables, e.g.
        
          WITH xyz[99].abc DO
        
          

                The most important topic is comments inside programs. Tp2cp
                passes all comments from the source to the translated result.
                What does P20 do with comments?

                    

        
        P2O passes all comments. Note that Jensen & Wirth Pascal / IS0 7185
        Standard Pascal does not allow nested comments. I have also implemented
        the code to handle nested comments but this is commented out for now.
        
          

                The second important topic is the name translations and
                adding subsystem names. Suppose you have to translate a
                bigger project with a lot of Units (MODULEs) and you would
                like to have the result into the same subsystem.

                    

        
        This is not within the scope of P2O because Jensen & Wirth Pascal / IS0
        7185 Standard Pascal does not include units / modules.
        
        Modular compilation did not appear in Standard Pascal (ISO 10206) until
        1990, about a decade after it was implemented in UCSD Pascal and five
        years after Turbo Pascal. Consequently, each Pascal dialect has their
        own different way of doing things. Standard Pascal uses keywords like
        MODULE, IMPORT and EXPORT which are closer to Modula-2 than many
        extended Pascals.
        
        P2O was not intended to be a Turbo Pascal translator - I would recommend
        Tp2cp to anybody who has Turbo Pascal code that they want to convert.
        
        I first mentioned P2O as I was considering extending it to support
        Delphi (the language formerly known as Object Pascal), but the more I
        think about it, the less I like the idea. Although Delphi would have to
        be the most widely used dialect of Pascal in existence today, most
        Delphi programs would have considerable dependence on the VCL (i.e.
        Delphi's equivalent of the BlackBox framework). Porting code then
        becomes more an issue of matching / redesigning API / Framework calls
        than a straightforward translation effort.
        
          

                An other topic is the character translations. Old Turbo
                Pascal uses the IBM-PC extended ASCII character set. I can
                translate this character set with module 4 to Unicode but the
                result is not working. See my last email via Black Box
                Mailing list. Have P20 a character translations?

                    

        
        No. I may be wrong, but I don't believe it is relevant when translating
        existing Jensen & Wirth / Standard Pascal source code.
        
        In summary, P2O's key features are:
        
        1. Translates Jensen & Wirth / ISO 7185 Standard Pascal source code.
        2. It is self-contained i.e. does not require any support programs to
        perform its task.
        2. BlackBox and Gardens Point Component Pascal versions have been
        implemented.
        3. GPCP enables it to potentially to be run on Linux and the Mac as well
        as Windows.
        
        Chris Burrows
        CFB Software
        http://www.cfbsoftware.com/gpcp
        
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
        
        ---------------
        
        Diese E-Mail wurde auf Viren ueberprueft.
        
        IG Metall
        
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
        
        
        
          








moz-screenshot-2.jpg
(image/jpeg attachment: moz-screenshot-2.jpg)

Received on Wed Oct 26 2005 - 19:43:42 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:07 UTC