Board index » delphi » Turbo Pascal and Delphi Questions

Turbo Pascal and Delphi Questions

I have a few questions:

1. Will "Turbo Pascal" ver 7.0 run in a DOS window in Win98 and/or if I boot
to the DOS prompt instead of Win98?

2. Is code written in "Turbo Pascal" usable in Delphi?

 

Re:Turbo Pascal and Delphi Questions


Quote
Janaka wrote:
> 1. Will "Turbo Pascal" ver 7.0 run in a DOS window in Win98 and/or if I boot
> to the DOS prompt instead of Win98?

Yes in both cases. Please read the FAQ, too, as you might encounter runtime
error 200.

Quote
> 2. Is code written in "Turbo Pascal" usable in Delphi?

Only with modifications. It depends on the program.

Re:Turbo Pascal and Delphi Questions


JRS:  In article <38772C8E.A5647...@mail.dotcom.fr> of Sat, 8 Jan 2000
13:24:46 in news:comp.lang.pascal.borland, Frederic Bonroy

Quote
<fbon...@mail.dotcom.fr> wrote:
>Janaka wrote:

>> 1. Will "Turbo Pascal" ver 7.0 run in a DOS window in Win98 and/or if I boot
>> to the DOS prompt instead of Win98?

>Yes in both cases. Please read the FAQ, too, as you might encounter runtime
>error 200.

>> 2. Is code written in "Turbo Pascal" usable in Delphi?

>Only with modifications. It depends on the program.

I think that's a little pessimistic.  Quite a few of my smaller programs
run unchanged as Delphi 3 console mode jobs, and modifications needed to
some of the others are slight.  Similarly with re-use of "calculation"
code in a Delphi GUI program.  But TV is out; and screen I/O is quite
different, except for console mode.

You do have to watch out for changes in variable types, and in library
routine names; but a little conditionalising should make a lot of code
usable in both.  I'm now trying the same with the demo version of TMT
Pascal, which has different differences - the first two programs are
usable so far.

--
? John Stockton, Surrey, UK.  j...@merlyn.demon.co.uk   Turnpike v4.00   MIME. ?
 <URL: http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
 <URL: ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ;
 <URL: http://www.merlyn.demon.co.uk/clpb-faq.txt> Pedt Scragg: c.l.p.b. mFAQ.

Re:Turbo Pascal and Delphi Questions


1. If you try to run the integrated editor/compiler
(turbo.exe) in a DOS window under Win98, you will get a
message to the effect that it will not run.  However, if you
create a .BAT file that has only

         turbo

and call the .BAT file, turbo will run in the DOS window!
The protected mode compiler, however, requires a DOS reboot.

2. Delphi uses Object Pascal.  Turbo Pascal code which is
compliant with Object Pascal syntax will run.  I have not
experimented with non-compliant code.

* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

Re:Turbo Pascal and Delphi Questions


pkmorse <pkmorseNOpkS...@bigfoot.com.invalid> a crit dans l'article
<27e47353.d5760...@usw-ex0109-069.remarq.com>...

Quote
> 1. If you try to run the integrated editor/compiler
> (turbo.exe) in a DOS window under Win98, you will get a
> message to the effect that it will not run.  However, if you
> create a .BAT file that has only
>          turbo
> and call the .BAT file, turbo will run in the DOS window!
> The protected mode compiler, however, requires a DOS reboot.

Hard to believe !
They work well in Win95. Is Win98 really that much different?
___________
Olivier Avenel  SPEC / CEA-Saclay   91191 Gif-sur-Yvette Cedex  France
ave...@drecam.saclay.cea.fr

Re:Turbo Pascal and Delphi Questions


Quote
"Olivier Avenel" <ave...@drecam.saclay.cea.fr> wrote:
>> The protected mode compiler, however, requires a DOS reboot.

>Hard to believe !
>They work well in Win95. Is Win98 really that much different?

when I use the protected mode compiler from the BP IDE in a
W98SE DOS window, it works.

Jud McCranie

Re:Turbo Pascal and Delphi Questions


Quote
Olivier Avenel <ave...@drecam.saclay.cea.fr> wrote in message

news:01bf5b62$ab7a39e0$6815a684@spec104...

Quote
> pkmorse <pkmorseNOpkS...@bigfoot.com.invalid> a crit dans l'article
> <27e47353.d5760...@usw-ex0109-069.remarq.com>...
> > 1. If you try to run the integrated editor/compiler
> > (turbo.exe) in a DOS window under Win98, you will get a
> > message to the effect that it will not run.  However, if you
> > create a .BAT file that has only
> >          turbo
> > and call the .BAT file, turbo will run in the DOS window!
> > The protected mode compiler, however, requires a DOS reboot.

> Hard to believe !
> They work well in Win95. Is Win98 really that much different?

I used BP.EXE under Win95 and Win98Se and it works fine. However, I notice
that my registry in Win95 has a key "My
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MS-DOS
Emulation\AppCompat\TURBO.EXE" and that TURBO.EXE gives the sort of message
he describes on that machine. That registry key was not put in by a Borland
install program - even if the install program could do such a thing, I did
not run the install program after I last reinstalled Win95 on this machine.
So it must come as a standard part of Win95 as a deliberate attempt to
sabotage TurboPascal. Renaming TURBO.EXE (to e.g. TURBOT.EXE) gets rid of
the problem.

FP

Re:Turbo Pascal and Delphi Questions


Quote
"Frank Peelo" <fpe...@indigo.ie> wrote:
>I used BP.EXE under Win95 and Win98Se and it works fine. However, I notice
>that my registry in Win95 has a key "My
>Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MS-DOS
>Emulation\AppCompat\TURBO.EXE" and that TURBO.EXE gives the sort of message
>he describes on that machine. That registry key was not put in by a Borland
>install program - even if the install program could do such a thing, I did
>not run the install program after I last reinstalled Win95 on this machine.
>So it must come as a standard part of Win95 as a deliberate attempt to
>sabotage TurboPascal. Renaming TURBO.EXE (to e.g. TURBOT.EXE) gets rid of
>the problem.

Now gold old Big Brother Bill wouldn't sabotage Borland, would
he? ;-)

My system has the same thing.  Renaming turbo.exe (as you said(
or calling it in a batch file) fixes the sabotage.

Jud McCranie

Re:Turbo Pascal and Delphi Questions


Quote
On Mon, 10 Jan 2000 14:03:16 -0500, Jud McCranie wrote:
> My system has the same thing.  Renaming turbo.exe (as you said(
> or calling it in a batch file) fixes the sabotage.

What about removing the key from the registry?

--
According to my calculations the problem doesn't exist.

Re:Turbo Pascal and Delphi Questions


Quote
William McBrine <wmcbr...@clark.net> wrote:

>What about removing the key from the registry?

That should work, but will Windows add it back, say if you
upgrade Windows?
Jud McCranie

Re:Turbo Pascal and Delphi Questions


I have Turbo Pascal ver 7.0 and use it with Windows 98-no problem.  There is
a shortcut icon which will open the application in DOS if you use windows
explorer.  Is that what you wanted to know?
Code written in TP is  useable in Delphi.  (Not all).  Just remember when
you compile from Delphi to call the Unit windows.

Example :  PROGRAM  Lalala;

                    USES Windows;

--
Groetnis,
Jaun le Roux
Suid Afrika

Quote
Janaka <jan...@moonstar.com> wrote in message

news:85732f$3vu$1@ffx2nh5.news.uu.net...
Quote
> I have a few questions:

> 1. Will "Turbo Pascal" ver 7.0 run in a DOS window in Win98 and/or if I
boot
> to the DOS prompt instead of Win98?

> 2. Is code written in "Turbo Pascal" usable in Delphi?

Re:Turbo Pascal and Delphi Questions


Frank Peelo <fpe...@indigo.ie> a crit dans l'article
<85d44v$jh...@kermit.esat.net>...

Quote
> I used BP.EXE under Win95 and Win98Se and it works fine. However, I
notice
> that my registry in Win95 has a key "My

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MS-DOS

Quote
> Emulation\AppCompat\TURBO.EXE" and that TURBO.EXE gives the sort of
message
> he describes on that machine. That registry key was not put in by a
Borland
> install program - even if the install program could do such a thing, I
did
> not run the install program after I last reinstalled Win95 on this
machine.
> So it must come as a standard part of Win95 as a deliberate attempt to
> sabotage TurboPascal. Renaming TURBO.EXE (to e.g. TURBOT.EXE) gets rid of
> the problem.

I just checked and I do have this "TURBO.EXE" key in my Win95 registry,
with name "TURBO.TPL" and value "01 00 00 00". But it does not prevent
Turbo.exe to run in a DOS window on my system.

Re:Turbo Pascal and Delphi Questions


Quote
"Olivier Avenel" <ave...@drecam.saclay.cea.fr> wrote:
>I just checked and I do have this "TURBO.EXE" key in my Win95 registry,
>with name "TURBO.TPL" and value "01 00 00 00". But it does not prevent
>Turbo.exe to run in a DOS window on my system.

On mine, if I try to run TURBO directly, it says that it has to
restart in DOS mode.  If I call it from a batch file (as I have
done since the 80s) it is OK.

Jud McCranie

Re:Turbo Pascal and Delphi Questions


On Tue, 11 Jan 2000 08:12:30 GMT, William McBrine <wmcbr...@clark.net>
wrote:

Quote
>On Mon, 10 Jan 2000 14:03:16 -0500, Jud McCranie wrote:

>> My system has the same thing.  Renaming turbo.exe (as you said(
>> or calling it in a batch file) fixes the sabotage.

>What about removing the key from the registry?

As I said, I use BP, which doesn't suffer from that. I'm not going to
make changes to my registry in order to post a message about a program
(TURBO.EXE) that I don't use. There's too much about the registry that
I feel I don't understand, so I don't want to change it unless it's
something important. (btw Could you recommend a Registry tutorial in
case I get some free time?)

FP

Re:Turbo Pascal and Delphi Questions


On Tue, 11 Jan 2000 19:08:51 +0200, "Jaun le Roux" <j...@icon.co.za>
wrote:

Quote

>I have Turbo Pascal ver 7.0 and use it with Windows 98-no problem.  There is
>a shortcut icon which will open the application in DOS if you use windows
>explorer.  Is that what you wanted to know?

Nope. Not as I understood it anyway. You quoted the original
questions, but somewhere in the replies there was the comment that
TURBO.EXE would behave oddly if you tried to run it as you would a
normal program, unless you called it from a batch file.

Normally, if you're in a DOS box and you want to run a DOS program,
you type in the name of the .EXE and the program starts up. BP.EXE
works fine this way, TURBO.EXE also does if it is renamed. But if you
try to run TURBO.EXE without renaming it, you get a message "Please
wait while Windows prepares to run this program..." and it starts to
open in a new window! Worse, it wants to run exclusively, giving the
message

  This program is set to run in MS-DOS mode and cannot run while other
  programs are running. All other programs will close if you choose to
  continue. Do you want to continue?

It wants to close everything down and restart in DOS mode. It has also
created a .PIF file for itself. Delete the .PIF and start again, it
does the same thing. grrr. (Oddly, even though I have Explorer set to
show all file types, this .PIF pretends to be extensionless in
Explorer. DIR in a DOS shell shows the extension.)

This makes TURBO look a lot less friendly than it is, and is
unnecessary.

Set the properties not to go into DOS mode and at least it will now
start, but still in a new window, not in the DOS box. Rename it or get
rid of the registry key and it will not only start correctly if you
double-click on it in Explorer, it will also start up like any other
DOS program if you type its name in a DOS shell (assuming it's on your
path etc.)

FP

Go to page: [1] [2]

Other Threads