Solved

Pascal and VB

Posted on 2001-08-22
17
319 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
ID: 6414858
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
ID: 6415039
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
ID: 6415204
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Accepted Solution

by:
RickHalle earned 100 total points
ID: 6415384
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
ID: 6415432
Do you think that purchasing Delphi would assist me?
0
 
LVL 6

Expert Comment

by:edey
ID: 6415475
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
ID: 6416338
>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
ID: 6416742
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
 
LVL 6

Expert Comment

by:edey
ID: 6417562
>>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
ID: 6418069
Could you please tell me more about COM objects and VB?  
0
 
LVL 6

Expert Comment

by:edey
ID: 6418567
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
ID: 6419100
So, I will probably need to contract out some of this to someone who knows Pascal?
0
 
LVL 6

Expert Comment

by:edey
ID: 6419446
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
ID: 6419453
Depends on how fast you need it, money available, and learning ability.

Rick Halle
0
 

Expert Comment

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

Author Comment

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

Author Comment

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
add combobox item based on numbers 9 154
Delphi 2 69
Is anyone willing to have a look through this code and help debug? 25 84
TEMBEDDEDWB how can i change its user agent ? 8 70
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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 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