Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

English Text into VB

Status
Not open for further replies.

inexperienced1

IS-IT--Management
Aug 9, 2002
49
US
I am looking for some ideas on how to write code that convert english text into vb code?

The reason being that I have a word document that details to a client what the code is going to do, this is in English. I then have to manual convert this in vb

For instance

Word Document says
Rule Name : MyRule

if [DOB] after 01/09/2003, set to True
Else set to False


VB Code would say

if dob > Cdate("01 sep 2003") then
MyRule = True
Else
MyRule = False
end if

Has anyone attempted any similar, or now of how to start. I am anticipating this to be a complex task, so I am just looking for some pointers or ideas.

Thanks


 
Complex task is right. You'd have to make a database of every possible English word or phrase, and its VB equivalent. This would be a nightmare.
Prepared to take about 20 years?
Crystalinity

P.S. In 10 years, VB will probably be obsolete. VB6 definately will. My advice: FORGET IT.
P.P.S. Why do you think Microsoft haven't tried it yet?
 
I am aiming only to deal with some specific areas within the document and keep things simple. The idea is to do half the job automatically and leave the "complex" half to a human brain.
 
Here's a pointer - FORGET IT!

Pseudo code is all very well, but trying to automatically convert it to VB is crazy. Yes, you would save time on the initial production of the code - but have you considered :


a) The amount of extra testing you would have to do to catch the problems created by the system.

b) That correcting said problems would require the services of a flesh and blood code cruncher anyway.

c) Said code cruncher would be working within in a restricted model, which would slow him / her down...

d) Pseudo code often does not reveal the most efficient means of accomplishing an objective anyway - tweaking is always needed.

Oh yes, and you'll be hunted down by out of work VB programmers...

I did wonder how you could seriously suggest this, but then I noticed that you describe yourself as Management - which explains rather a lot.

 
Not to rip on you, but management (at least where I work) doesn't have a clue what all goes on in programming. Psuedocode is a great way to plan out the main flow and general functions of a program and to explain it to non programmers, but doing the actual programming is entirely different. Something that you can describe in one line in psuedocode might take 1,000's of lines of code to actually implement properly.

With all the people who are programming, if this project was possible, I think someone would have done it by now. But then again, I hate to discourage any one from trying to come up with something new.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top