[comp.lang.modula2] PASCAL -> MODULA-2

cs325ec@ux1.cso.uiuc.edu (03/13/90)

	Is there a simple filter out there that will convert 
	pascal source to modula 2 source?

	Thanks.

	-- Greg

reid@CTC.CONTEL.COM (Tom Reid x4505) (03/13/90)

>
>        Is there a simple filter out there that will convert
>        pascal source to modula 2 source?
>
>        Thanks.
>
>        -- Greg
>

Try the Logitech Modula-2 compiler.  One of their included programs for the
PC was a Turbo-Pascal (3.0) to their Modula-2 compiler.  The library
conversions were atrocious but is handled the statments and expressions
just fine.

Tom.

Thomas F. Reid, Ph. D.                   (703)818-4505 (work)
Contel Technology Center                 (703)742-8720 (home)
15000 Conference Center Drive            Net: reid@ctc.contel.com
P.O. Box 10814
Chantilly, Va.  22021-3808

maner@bgsuvax.UUCP (Walter Maner) (03/14/90)

From article <7400003@ux1.cso.uiuc.edu>, by cs325ec@ux1.cso.uiuc.edu:
> 
> 
> 	Is there a simple filter out there that will convert 
> 	pascal source to modula 2 source?


LOGITECH used to sell one that converted Turbo Pascal to Logitech Modula-2.
For regular programs, a good deal of manual fine tuning was needed before
the Modula-2 program would compile.  DEC's Western Research Lab also had a
translator called p2m2 which, I suppose, translated VAX pascal into their
own dialect of Modula-2.
WALT
-- 

InterNet maner@andy.bgsu.edu  (129.1.1.2)    | BGSU, Comp Science Dept
UUCP     ... ! osu-cis ! bgsuvax ! maner     | Bowling Green, OH 43403
BITNet   MANER@BGSUOPIE                      | 419/372-2337  Secretary
Relays   @relay.cs.net, @nsfnet-relay.ac.uk  | FAX is available - call

Pat.Terry@p101.f4.n494.z5.fidonet.org (Pat Terry) (03/16/90)

 > From: cs325ec@ux1.cso.uiuc.edu
 > 
 >         Is there a simple filter out there that will convert 
 >         pascal source to modula 2 source?
 > 
Only one I know of is the Logutech one that converts Turbo Pascal to Logitech
M-2
 




--  
uucp: uunet!m2xenix!puddle!5!494!4.101!Pat.Terry
Internet: Pat.Terry@p101.f4.n494.z5.fidonet.org

Fred.van.der.Windt@f106.n512.z2.fidonet.org (Fred van.der.Windt) (11/26/90)

Hello,
 
I'm looking for a program that can convert (Turbo) Pascal source code to Modula-2. Has anybody seen something like this?
 
                Fred! 


--  
uucp: uunet!m2xenix!puddle!2!512!106!Fred.van.der.Windt
Internet: Fred.van.der.Windt@f106.n512.z2.fidonet.org

is.at.2:502/15@f100.n502.z2.fidonet.org (is at 2:502/15) (11/30/90)

 > I'm looking for a program that can convert (Turbo) 
 > Pascal source code to Modula-2. Has anybody seen 
 > something like this? 

Logitech has one, but I think it is only for TP ver. 3.


--  
uucp: uunet!m2xenix!puddle!2!502!100!is.at.2:502/15
Internet: is.at.2:502/15@f100.n502.z2.fidonet.org

Frank.Warren@f42.n161.z1.fidonet.org (Frank Warren) (12/03/90)

   Actually, I'd suggest a hand conversion.  Meanwhile, Stony Brook is
coming out with a killer Turbo Pascal compiler that is as good as the M2
product, being based on it.
   There is enough difference between Pascal and Modula-2 that, while this
may sound a little stuffy, I think conversions should be hand done.

--  
uucp: uunet!m2xenix!puddle!161!42!Frank.Warren
Internet: Frank.Warren@f42.n161.z1.fidonet.org

jau@news.funet.fi.tut.fi (Jukka Antero Ukkonen) (12/05/90)

From article <2170.275C00DC@puddle.fidonet.org>, by Frank.Warren@f42.n161.z1.fidonet.org (Frank Warren):
>    There is enough difference between Pascal and Modula-2 that, while this
> may sound a little stuffy, I think conversions should be hand done.

	I did not quite get what is that enough difference.
	The only real differences are a more strict type model in the Modula-2
	and a somewhat different IO-routine set.
	In general conversions could be done with a fairly simple program
	if types are 'well' used in the Pascal program and one is ready to
	do some handwork with the IO.

		- jau -
------
  /    Jukka Ukkonen  --  Tampere Univ. of Tech./Software systems lab.
 /__   Internet: jau@tut.fi             Tel:     (Home) +358-31-180195
   /   Bitnet:   jau@fintut                      (Work) +358-31-162590
  v    X.400:    c=fi, admd=fumail, prmd=inet, org=tut, pn=jau

Eric.Mckinney@p1.f17.n382.z2.fidonet.org (Eric Mckinney) (12/06/90)

 On 02-Dec-90, Frank Warren allegedly said:

 FW> Actually, I'd suggest a hand conversion.  Meanwhile, Stony Brook is
 FW> coming out with a killer Turbo Pascal compiler that is as good as the M2
 FW> product, being based on it.

Have you actually used StonyBrook?  I hear it's even faster than TopSpeed,
and it includes Windows programming ability to boot.  Do you have a phone
number or address where I can get in contact with StonyBrook?

Eric


--  
uucp: uunet!m2xenix!puddle!2!382!17.1!Eric.Mckinney
Internet: Eric.Mckinney@p1.f17.n382.z2.fidonet.org

eepjm@cc.nu.oz.au (12/10/90)

In article <1990Dec5.133742.23007@funet.fi>, jau@news.funet.fi.tut.fi (Jukka
 Antero Ukkonen) writes:
> 
> From article <2170.275C00DC@puddle.fidonet.org>, by
 Frank.Warren@f42.n161.z1.fidonet.org (Frank Warren):
>>    There is enough difference between Pascal and Modula-2 that, while this
>> may sound a little stuffy, I think conversions should be hand done.
> 
> 	I did not quite get what is that enough difference.
> 	The only real differences are a more strict type model in the Modula-2
> 	and a somewhat different IO-routine set.

You forgot the most crucial difference: the ability to break up a program
into modules.  Would you want to convert a 30-page Pascal program into a
single Modula-2 module?

I agree with Frank, on the basis of personal experience. I used to program a
lot in Pascal, and I tried to follow the accepted principles of clean
program design, but I found that my programs always became unmanageable after
the size grew beyond about 20 pages.  (This was with a number of different
Pascal compilers, some of which claimed to support modularisation ... but
there I kept running into trouble with inappropriate divisions into modules,
caused by poor language support for the module concept.)  For the past couple
of years I've used Modula-2 for almost all my coding, and I find that during
top-down coding the decisions about when to create a new module and what to
put in each module have become easy (basically, it's that procedures belong
together when they work on the same kind of object). But if I had an
*existing* program, for example in Pascal, I would find it much less easy
to do the break-up unless I started coding from scratch.  And in fact I've
taken some of my old big Pascal programs, rewritten them from the beginning
in Modula-2, and have observed that the new versions are much more readable
than the originals - and sometimes much more efficient, because in a
clearly readable program it's easier to see better ways of doing things.

By the way, I don't want to come across as one of those people who think
that Modula-2 is the best thing since sliced bananas. When a better language
arrives, I'll convert to it (I've gone through a lot of languages in the last
20 years).  My main point is that there is a fairly major difference, in terms
of the programming style which is encouraged, between Pascal and Modula-2.

IMAO, automatic translation has its place when going from a higher- to a
lower-level language, e.g. Pascal to C; because such translations are done
mainly in cases where there is not a suitable compiler for the first
language, and readability of the translated code is not a real issue.
But in going from a lower- to a higher-level language, the goal is
presumably to have target code which can be maintained, revised, etc., so
it's important to have a high-quality translation.  At the moment, it
looks as if only human coders can provide the requisite high quality.

Peter Moylan                 eepjm@cc.nu.oz.au
Disclaimer: the views in this posting are not necessarily opinions.

Frank.Warren@f42.n161.z1.fidonet.org (Frank Warren) (12/14/90)

    Yes, Stony Brook can be reached at 805-496-5837 and I've used it.
The QuickMod compiler is blindingly fast, the Pro compiler produces
beautiful code but is slower (it optimizes the fit of your underweaer
if you want it to) and it's a fine package.
    30 day money-back guarantee, so you can have a look-see without
having to go into permanent hock to see it.

--  
uucp: uunet!m2xenix!puddle!161!42!Frank.Warren
Internet: Frank.Warren@f42.n161.z1.fidonet.org

Eric.Mckinney@p1.f17.n382.z2.fidonet.org (Eric Mckinney) (12/18/90)

 On 13-Dec-90, Frank Warren allegedly said:

 FW> 30 day money-back guarantee, so you can have a look-see without
 FW> having to go into permanent hock to see it.

Sounds great, but how much in debt will the Pro version put me?

Eric


--  
uucp: uunet!m2xenix!puddle!2!382!17.1!Eric.Mckinney
Internet: Eric.Mckinney@p1.f17.n382.z2.fidonet.org