Link to home
Start Free TrialLog in
Avatar of Ren
Ren

asked on

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
Avatar of edey
edey

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

GL
Mike
Avatar of Ren

ASKER

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.  
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
ASKER CERTIFIED SOLUTION
Avatar of RickHalle
RickHalle

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ren

ASKER

Do you think that purchasing Delphi would assist me?
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: https://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
>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.
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.
>>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
Avatar of Ren

ASKER

Could you please tell me more about COM objects and VB?  
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
Avatar of Ren

ASKER

So, I will probably need to contract out some of this to someone who knows Pascal?
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
Depends on how fast you need it, money available, and learning ability.

Rick Halle
How soon do you need this and how much do you have
to spend?
Avatar of Ren

ASKER

Time is abundant (+ 3 mos), but money is not so much!  
Avatar of Ren

ASKER

I am just closing out old questions that I had neglected.  Thanks for your comments.  --Ren