Solved

Pascal and VB

Posted on 2001-08-22
17
315 Views
Last Modified: 2010-04-06
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
0
Comment
Question by:Ren
  • 6
  • 6
  • 2
  • +3
17 Comments
 
LVL 6

Expert Comment

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

GL
Mike
0
 

Author Comment

by:Ren
Comment Utility
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
 
LVL 6

Expert Comment

by:edey
Comment Utility
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
 
LVL 2

Accepted Solution

by:
RickHalle earned 100 total points
Comment Utility
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
 

Author Comment

by:Ren
Comment Utility
Do you think that purchasing Delphi would assist me?
0
 
LVL 6

Expert Comment

by:edey
Comment Utility
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
 
LVL 5

Expert Comment

by:scrapdog
Comment Utility
>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
 
LVL 3

Expert Comment

by:rondi
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 6

Expert Comment

by:edey
Comment Utility
>>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
 

Author Comment

by:Ren
Comment Utility
Could you please tell me more about COM objects and VB?  
0
 
LVL 6

Expert Comment

by:edey
Comment Utility
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
 

Author Comment

by:Ren
Comment Utility
So, I will probably need to contract out some of this to someone who knows Pascal?
0
 
LVL 6

Expert Comment

by:edey
Comment Utility
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
 
LVL 2

Expert Comment

by:RickHalle
Comment Utility
Depends on how fast you need it, money available, and learning ability.

Rick Halle
0
 

Expert Comment

by:eshipman
Comment Utility
How soon do you need this and how much do you have
to spend?
0
 

Author Comment

by:Ren
Comment Utility
Time is abundant (+ 3 mos), but money is not so much!  
0
 

Author Comment

by:Ren
Comment Utility
I am just closing out old questions that I had neglected.  Thanks for your comments.  --Ren
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now