Pascal and VB

Hello Experts!  I am really shooting in the dark on this subject, and I am hoping that someone can shed some light on it for me.  
I have been asked to look at a program that was written back in the late eighties in Turbo Pascal for DOS.  They would like the program to be easily converted into a Windows-based program, but I am not sure about how easily this can be accomplished.  I pretty much only program on the side, and when I do, I program in VB, so I have no real experience in this language.  Ideally, they would like to see a section of the program be able to be run from a VB application that I created last year, but again I am clueless about how to go about this!  I would really appreciate any information that you could provide me with.  Thanks in Advance!  --Ren
RenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

edeyCommented:
What does it do? perhaps someone may have already "invented the wheel" - you might be able to reuse something.

GL
Mike
0
RenAuthor Commented:
The program reads a loose code format that trained employees write in order to run edits and statistics on input data from companies within specific industries.  The program is great, because of its simplicity for the users.  Several of the employees (who have no programming experience) have been writing the same lines of code for 15 years, and no one is looking for change in what is written.  Last year, I created a software program in VB for them to distribute to individual companies.  They want to enhance this program by allowing the individual companies to run the same statistics that they do on the data.  Since there are oftetimes several different ways to calculate certain statistics (depending on the industry), they would like to be able to use the same code that the employees write for each study.  They do not want to have to recreate code for each study.  
0
edeyCommented:
In that case I guess you'r prob stuck doing it the hard way - learning a little pascal & reverse engineering the file format.  OTOH, if you're looking at that kind of project it might be easier to dump the old stuff altogether & with a new format.  I'd suggest looking into writing an XML DTD, that way you don't have to write the parser too.

GL
Mike
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

RickHalleCommented:
You will need to learn some pascal to do this. I see a big downfall in the pascal to vb proposal though. It is usually fairly easy to go from vb to delphi because delphi uses the same variable types. (integers, strings,etc.) The other direction is often difficult though because vb does not support all of the types pascal does. (If you have done any API stuff in VB then you have probably run into these) I would guess that you will be better off to use the previous app as a template. Also I am unsure as to how early pascal handled math functions but Delphi handles it different than VB does in some cases. This could effect any formulas you obtain from the original code.

Rick Halle
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RenAuthor Commented:
Do you think that purchasing Delphi would assist me?
0
edeyCommented:
you could try out the free (for non commercial use) version.  It doesn't have much documentation, but a download & a book would prob. a be somewhat cheaper intro.  I recently posted this: http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=delphi&qid=20163035 when borland released D6 Personal.  note, the liscence prohibits you from selling apps written with it, and it doesn't come with DB support.

GL
Mike
0
scrapdogCommented:
>the liscence prohibits you from selling apps

I haven't seen the license, but does it also prohibit you from *distributing* apps (e.g. as freeware)?  Just curious.
0
rondiCommented:
i recommend that you take your pascal code and wrap
it up in COM objects that can be used easily by VB.
You'll need Delphi to compile everything.
You may need *some* knowledge of Pascal & Delphi's object
model - but most of the code shouldn't need RE-writing - just careful arrangement.
Perhaps it would help to use an older version of Delphi eg. 2.0

All the best,
rondi.
0
edeyCommented:
>>the liscence prohibits you from selling apps

>I haven't seen the license, but does it also
>prohibit you from *distributing* apps
>(e.g. as freeware)?
>Just curious.

Nope, you can distribute all you want, with or without source (unlike the free kylix which some kind of GPL on your source) as you see fit.  You just can _sell_ your stuff.  I would think, though, that the licence would allow you to create tools for inhouse use.

GL
Mike
0
RenAuthor Commented:
Could you please tell me more about COM objects and VB?  
0
edeyCommented:
In some versions of Delphi (Pro & Enterprise) you can create your own ActiveX Controls.  Knowing this one, who already knew a fair bit of pascal, could wrap the old TP stuff in an activeX that somebody else could use in VB.

GL
Mike
0
RenAuthor Commented:
So, I will probably need to contract out some of this to someone who knows Pascal?
0
edeyCommented:
This sort of project, if you _have_ to keep the old data & file formats, is prob. cheapest/easiest to contract out. Text parsing is just one of those items that are rather error prone & involve some trouble shooting - even for htose somfotable with the tools at hand.  Realisticaly I don't think there's an easy answer for this.

GL
Mike
0
RickHalleCommented:
Depends on how fast you need it, money available, and learning ability.

Rick Halle
0
eshipmanCommented:
How soon do you need this and how much do you have
to spend?
0
RenAuthor Commented:
Time is abundant (+ 3 mos), but money is not so much!  
0
RenAuthor Commented:
I am just closing out old questions that I had neglected.  Thanks for your comments.  --Ren
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.