Announcement

Collapse
No announcement yet.

port a PB/DOS prog to PB/CC

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Eric Pearson
    replied
    Yes, there are some source-code-conversion programs out there. I'm told that they can significantly reduce the amount of work that is required to port a program from PB/DOS to PB/CC, but I've never used them myself so I can't give you any details.

    > And I do not really understand why PB/DLL uses
    > other function declarations tha PB/DOS.

    Can you be more specific? What is different?

    -- Eric

    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>

    Leave a comment:


  • Bernd Storck
    Guest replied
    Hi Eric,

    Thank you. Your answer does help me. I think I would check it out - and you win - I will contact my German reseller to order PB/CC, I'm always to curios.

    Whatever, not to your adress: I'm wonder if there is a Tool which does help to automate some conversion. And I do not really understand why PB/DLL uses other function declarations tha PB/DOS. why does PB/DLL not support the old PB/DOS style to declare functions, may be by a switch in the compiler?


    Regards Bernd 'Elek' Storck

    Leave a comment:


  • Eric Pearson
    replied
    Elek --

    > Does oder does not PB/CC compile a
    > PB/DOS program without changes?

    No, it does not.

    Level 1: You will be required to make some very simple changes in any PB/DOS program, such as adding a "PBMain" function wrapper around your main code. In other words, this PB/DOS program

    Code:
    PRINT "HELLO WORLD"
    ...becomes this PB/CC program...

    Code:
    FUNCTION PBMain
        PRINT "HELLO WORLD"
    END FUNCTION
    There is no such thing as PB/CC code that is not inside a sub or function, and PBMain is the "starting point" for every program. This change (which is part of virtually all Windows languages) might also require you to make other changes in your program, since END is not supported by PB/CC. You must always EXIT FUNCTION from the PBMain function in order to terminate your program. It's a Windows thing.

    Level 2: Other changes that will be required will depend on your programming style and the PB/DOS functions you use. While a great deal of the syntax is identical (98% ?) some PB/DOS functions (such as graphics) are simply not supported because of Windows limitations, and some "antique" PB/DOS functions (such as using INPUT for keyboard input) have been retired and/or replaced by improved functions. Error Handling is also significantly different in Windows languages, unless you routinely use ON ERROR RESUME NEXT. Again, it will depend on your current programming style.

    Level 3: Once you have compiled your program with PB/CC for the first time, you will probably want to take advantage of the "richness" of the PB/CC language, compared to PB/DOS. Many, many functions have been added, and it is not uncommon for people to replace entire blocks of code with one line that uses a PB/CC keyword like PARSE$.

    The user-interface changes that a PB/DOS-to-PB/DLL conversion requires will not be necesary because unlike PB/DLL, PB/CC supports PRINT/LOCATE/COLOR/CLS/etc.

    If you are looking for a way to convert your PB/DOS programs to Windows console applications, then PB/CC is by far the easiest route. But it is not going to be a matter of loading your old source code and selecting "Compile". Sorry.

    Somewhere on this BBS is a thread that details most of the changes that might be necessary. If I can find it, I will post a link. Unless Lance beats me to it and posts a new FAQ.

    -- Eric


    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>



    [This message has been edited by Eric Pearson (edited May 30, 2000).]

    Leave a comment:


  • Bernd Storck
    Guest started a topic port a PB/DOS prog to PB/CC

    port a PB/DOS prog to PB/CC

    Hi,

    I've read the description of PB/CC and all others different times and surely I would be able to repeat the arguments, wihich are used to sell it.

    But the only thing which really is important to me is, which changes are nessesary to port a PB/DOS program to PB/CC. If it's the same thing like convert a program to PB/DLL this product doesn't help me and it seems only like a little brother of PB/DLL.

    Your PB/DLL compiler for example uses other statements to declare functions an dit makes me crazy to convert such a program in fakt I've given up because of the time eating effort to change the code of a program which does work perfectly under DOS.

    Does oder does not PB/CC compile a PB/DOS program without changes?


    Regards Bernd 'Elek' Storck

Working...
X