Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 327
  • Last Modified:

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
0
Ren
Asked:
Ren
  • 6
  • 6
  • 2
  • +3
1 Solution
 
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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
 
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

  • 6
  • 6
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now