tags:

views:

182

answers:

9

I was using Turbo Pascal for about 20 years, but now I have changed my computer, and I have Windows 7 now. TP does not work under it. What similar language can I use instead of TP, that will require from me to spend minimum possible time studying it.

+2  A: 

Turbo Pascal to Delphi (~ object oriented Pascal) would seem like the natural choice / progression.

Although a lot of other languages today are relatively easy to pick up as well (Python, Ruby, etc...).

ChristopheD
Thank you! Can I use my old TP programs to run under Delphi with little or now amendments in them?
Nick
If it is pure calculating pascal code, it will work to a fairly high degree. Howver, if it is full of 16-bittisms and dosisms like most TP code, you can take it nowhere but a dos emulator. So basically the question is if you want total standstill (-> emulator) or modest adaption (going to FPC or Delphi to make real Windows programs).
Marco van de Voort
+2  A: 

I strongly advise you to learn C#.

You'll have to learn the OO Paradigma. But, once you get it, you'll enjoy the new world of modern computer programming.

pablosaraiva
Turbo Pascal 5.5 introduced object oriented capabilities in 1990.
Darrel Miller
While there's nothing wrong with learning C#, what makes it a useful replacement for Turbo Pascal? You could just as easily suggest Java, Ruby, Groovy, Visual Basic, Perl, ...
Joachim Sauer
Turbo Pascal does have OO, but it lacks many modern features. And I could have sugested Java or Ruby, but, in my humble opinion, C# would be a good place to go first.
pablosaraiva
Thank you. But I prefer to use something compartible to TP, because I have a lot of programs already written, and I have very little desire to write them again, in different language. The best solution for me is to use copy-paste in window with new language, and then run! :-)
Nick
+1  A: 

Turbo Pascal evolved into Delphi, which is still used today but might be hard to find.

Your options are probably:

Greg Hewgill
Thank you! Can I just run my TP programs under GNU or Free Pascal with no amendments in them?
Nick
@Nick: I can't promise there will be *no* changes, but as I understand it the languages are largely compatible. There may be minor changes required. (I used TP many years ago, but not since around 1994 so I've never used the newer compilers.)
Greg Hewgill
Delphi can be ordered nearly everywhere where they sell development softawre? It is the second most sold IDE after VS. However there are no free versions anymore, and the entry pricing ($1000 magnitude) is stiff, so I suggest Free Pascal (which is more TP compatible). Forget GNU Pascal, even basic string manipulation doesn't work.
Marco van de Voort
+5  A: 

There is FreePascal:

http://www.freepascal.org/

It appears to be supported, I'm not sure how different it is to the Borland variant though.

Delphi is another option.

Jon
Differences here: http://www.freepascal.org/port.var
Jon
This guy also had the same problem - the suggestion there is to use Dosbox to run TurboPascal - http://social.answers.microsoft.com/Forums/en-US/w7programs/thread/eb382bf7-bd50-4565-9b2a-6f7d7dea8eb6
Jon
Freepascal is the same as a language, but the entire OS interfacing will be different. Even on Dos (due to the extender). Still I think this (short of the bigger jump to Delphi) is the only viable choice.
Marco van de Voort
No, I don't think it is exactly the same language- take a look at the link. I wasn't suggesting FreePascal on Dosbox, I was suggesting Turbopascal by the way
Jon
FPC language is nearly exactly the same. (and most users won't be able to find the differences) It doesn't fully emulate dos and 16-bits though. But setting up and maintaining emulators costs time too, and might become more difficult with 64-bit Windows versions. It might be worth to clean out the dirtiest aspects of TP programming and migrate to FPC or Delphi.
Marco van de Voort
+1  A: 

What kind of software do you expect to be able to write? Is this for professional development, hobby use,...?

If you are writing COTS software for Windows, I'd suggest one of the .NET languages. C# probably has the most publicly available tutorials, free code, controls, and such. Or learn Ruby and separate yourself from the crowd.

PatrickV
Just simple programs, that work with stock quotes archives, and apply different kind of technical analisys, which is invented by myself and differs from classical approach.
Nick
Then, as others have suggested, probably better to just stick with what you know. If you do switch, I recommend learning the language that is most useful, not the one that is easiest to learn. If the programs are not complex, it will probably be a pretty easy switch to something like C# - but then again, I know it, so of course I think it's easy. ;) Good luck.
PatrickV
+4  A: 

If you want to run the 20 year old Turbo Pascal on Win 7, you still can.

Download DosBox, and run TurboPascal in there. http://www.dosbox.com/

aaaa bbbb
+1  A: 

Python.

Cross platform, free, open source.

Has PyGTK, Tcl, wxWidgets and many more libraries for GUIs.

An application you write in Python will likely run well on all three main OSes (Windows, Linux, Mac) with little to no changes.

Python's syntax is similar to Pascal's but there are several important differences. For one, you don't define variables, and the types of variables are free to change. And there are no if ... then ... begin ... end statements as indentation is used.

It is also much more forgiving than Pascal syntax and type wise (not that that should be a reason for choosing a language!)

Because it is interpreted it will be slower. That can be a disadvantage for some applications, but it's usually not noticeable.

Thomas O
It also doesn't create standalone binaries? For small util work that would hurt for me more than a bit of speed.
Marco van de Voort
py2exe and various other programs can turn Python scripts into standalone executables. (AFAIK they require a Python dll in the current directory but not Python installed.) They are available for Windows, Linux and I think Macs.
Thomas O
I'll take that as a no :-)
Marco van de Voort
Well - no - Python doesn't create standalone binaries, but there are programs to create them from Python scripts, as I said.
Thomas O
A: 

Yes, the natural progression would be to change to Lazarus/Freepascal or Delphi. I strongly agree that you can still run TP if you liked, though.

However, it is a very good opportunity for an update. C# is a programming language that was developed by the creator of Turbo Pascal/Delphi, and indeed it has many features borrowed from Object Pascal.

If you choose C# development of Mono, you can use very modern GUI such as Monodevelop and create multi-platform applications with GTK# without any effort.

http://www.mono-project.com/Main_Page

http://monodevelop.com/

If you don't care about being multiplatform, you prefer to write software only for Windows, then you can choose Visual C# 2010 Express (its free):

http://www.microsoft.com/express/Downloads/#2010-Visual-CS

Baltasarq
Thank you! But programming is not my business, so I prefer the solution, which does not require me to learn new language, and to write all my programs again in new language.
Nick
Hope you are still switching to FreePascal, at least.
Baltasarq
+1  A: 

FreePascal has a switch for TurboPascal compatibility (so you will have no need to change your programming habbits), and it can generate DOS, WIN32, WIN64 and other executables.

avra
Thank you! It seems to me that using Free Pascal is a good idea in my case!
Nick