Slashdot Mirror


Solaris Pascal on Linux?

Wim Borgers asks: "In our company we're trying to get rid of an old Sun machine before it lease expires and has to be replaced by another one (very soon). Since they are very expensive, we would like to use a Linux box instead. After weeks of trying to convert the Pascal programs, we finally reached a point where we think that it is impossible to migrate the machine: apparently the dialect of Sun Pascal is very specific and cannot be recompiled in Linux without complete rewriting the code... (and we lack the time to make such an undertaking). I think we better save those resources to convert to more decent working programs in the middle to long term. Does anyone have an idea how to get it these things run anyway?"

"The department that uses the machine does a lot of text processing using older Pascal and Cobol programs that were developed during the past years in Sun Workshop. Since we would like to start using XML, and Pascal is less used these days, we also have some viable reasons not to invest in a new Sun machine.

Instead of using Linux we also considered using the free Solaris binaries, but the (older) workshop we need is not released on Intel, but only SPARC and the new Forte programs didn't include the necessary compiler.

Eternal thanks to any who can help us!"

3 of 11 comments (clear)

  1. the buyouts by ReidMaynard · · Score: 2, Informative

    of leased computers are usually pretty cheap.

    We had dozens of 3 year leased Sun Ultra 20's and the buyout was only about $400 per at the end of the lease.

    It sounds like just buying the box would be the least expensive & least painfull solution.

    As an interesting note, they were all leased with 20" sun monitors, and the leasing company didn't even want them back.

    --
    -- www.globaltics.net

    Political discussion for a new world

  2. Clone the compiler. by pete-classic · · Score: 2

    A couple things you could do:

    1. Write a library to make the code that is invalid in whatever Pascal compiler you want to use valid. (i.e. emulate missing built-in funcions)

    2. Automate translating code from one version to another. For instance, maybe the Sun Pascal has OO extensions, and you could automate translating the Sun object declarations to Objective Pascal (that's a language, right?) style declarations.

    3. There is surely a Free (or at least open) Pascal compiler that you could modify to compile the Sun style code.

    I'd bet that the best bet is a bit of all three.

    It also seems that Pascal and C should translate almost exactly 1-1. There is a Pascal to C conversion script out there, you might be able to write a Sun Pascal to C conversion script faster than any of the other suggestions.

    Good luck!

    -Peter

  3. Re-write the code with a program. by Black+Parrot · · Score: 2

    Surely the Sun Pascal syntax differs from the "standard" in a regular manner. In such a case it would be a fairly straightforward problem to write a program that takes Sun-flavored Pascal as its input and spits out Linux-flavored Pascal as its output.

    --
    Sheesh, evil *and* a jerk. -- Jade