Author |
Message |
bradford #1 / 25
|
 Please Don't Laugh!
Hello, I've been asked to re-write a quite extensive 15000 line BASIC program into Visual Basic. I'm not opposed to going line by line and doing a direct port over, but... Are there any utilities that can make this less painful? Something that can make some simple assumptions and get it closer to VB than just straight BASIC. I know its not that simple, but I've gotta ask. Thanks! Brad
|
Mon, 26 Jan 2004 12:17:07 GMT |
|
 |
Marc van den Dikkenbe #2 / 25
|
 Please Don't Laugh!
Quote: >I've been asked to re-write a quite extensive 15000 line BASIC program into >Visual Basic. I'm not opposed to going line by line and doing a direct port >over, but... >Are there any utilities that can make this less painful? Something that can >make some simple assumptions and get it closer to VB than just straight >BASIC. I know its not that simple, but I've gotta ask.
It would help to know what 'straight basic' you are talking about... Prehistoric ANSI-basic? GW-BASIC? BASICA? Business Basic? QBASIC? QuickBASIC? PDS? Visual BASIC for DOS? powerbasic? GFA Basic? <fill in the blank>-BASIC? Some flavors are significantly harder to port to VB than others... -- Marc van den Dikkenberg -- The PowerBASIC Archives (US) -- http://www.pbarchives.org The PowerBASIC Archives (EU) -- http://www.xs4all.nl/~excel/pb.html All BASIC Code Archives (EU) -- http://www.xs4all.nl/~excel/pbabc.html
|
Mon, 26 Jan 2004 14:09:52 GMT |
|
 |
bradford #3 / 25
|
 Please Don't Laugh!
...Timex Sinclair 2068 BASIC... Quote: > >I've been asked to re-write a quite extensive 15000 line BASIC program into > >Visual Basic. I'm not opposed to going line by line and doing a direct port > >over, but... > >Are there any utilities that can make this less painful? Something that can > >make some simple assumptions and get it closer to VB than just straight > >BASIC. I know its not that simple, but I've gotta ask. > It would help to know what 'straight basic' you are talking about... > Prehistoric ANSI-basic? GW-BASIC? BASICA? Business Basic? QBASIC? > QuickBASIC? PDS? Visual BASIC for DOS? PowerBASIC? GFA Basic? > <fill in the blank>-BASIC? > Some flavors are significantly harder to port to VB than others... > -- > Marc van den Dikkenberg
|
Tue, 27 Jan 2004 03:31:59 GMT |
|
 |
Howard Kaiko #4 / 25
|
 Please Don't Laugh!
If you have a manual for the BASIC version, then you are faced with a straightforward, albeit tedious, task. Should not be as hard as converting WordBasic to VBA. -- Please post your response to the newsgroup. Do not email me a copy of the message. http://www.standards.com/ipusers/standards; Word macros, including converting from WordBasic to VBA; Technical writing and reviewing; Standards ------------------------------------------------
Quote: > Hello, > I've been asked to re-write a quite extensive 15000 line BASIC program into > Visual Basic. I'm not opposed to going line by line and doing a direct port > over, but... > Are there any utilities that can make this less painful? Something that can > make some simple assumptions and get it closer to VB than just straight > BASIC. I know its not that simple, but I've gotta ask. > Thanks! > Brad
|
Tue, 27 Jan 2004 04:28:44 GMT |
|
 |
Andreas Meil #5 / 25
|
 Please Don't Laugh!
Quote: > Are there any utilities that can make this less painful? Something that can > make some simple assumptions and get it closer to VB than just straight > BASIC. I know its not that simple, but I've gotta ask.
I wrote a comprehensive article about migrating BASIC programs from GW-BASIC up to VB6, so check it out at http://dreael.catty.ch/Deutsch/BASIC-Knowhow-Ecke/MigrationProgramme.... Note: Use http://babelfish.altavista.com to translate the German text. Hopefully, that something might be useful for you... :-) Andreas
|
Tue, 27 Jan 2004 04:35:31 GMT |
|
 |
Grant Dixo #6 / 25
|
 Please Don't Laugh!
Searching my memories banks waaaaaaaaaaaaaay back Timex Sinclair I think used MSBasic or a very close flavour of it. -- Grant http://members.home.net/grant.dixon/index.htm ********************************************************* Creativity is so delicate a flower that praise tends to make it bloom, while discouragement often nips it in the bud. Any of us will put out more and better ideas if our efforts are appreciated. Alexander F. Osborn (1888 - 1966) *********************************************************
Quote: > ...Timex Sinclair 2068 BASIC... > > >I've been asked to re-write a quite extensive 15000 line BASIC program > into > > >Visual Basic. I'm not opposed to going line by line and doing a direct > port > > >over, but... > > >Are there any utilities that can make this less painful? Something that > can > > >make some simple assumptions and get it closer to VB than just straight > > >BASIC. I know its not that simple, but I've gotta ask. > > It would help to know what 'straight basic' you are talking about... > > Prehistoric ANSI-basic? GW-BASIC? BASICA? Business Basic? QBASIC? > > QuickBASIC? PDS? Visual BASIC for DOS? PowerBASIC? GFA Basic? > > <fill in the blank>-BASIC? > > Some flavors are significantly harder to port to VB than others... > > -- > > Marc van den Dikkenberg
|
Tue, 27 Jan 2004 06:12:17 GMT |
|
 |
Todd #7 / 25
|
 Please Don't Laugh!
Quote:
> > Are there any utilities that can make this less painful? Something that > can > > make some simple assumptions and get it closer to VB than just straight > > BASIC. I know its not that simple, but I've gotta ask. > I wrote a comprehensive article about migrating BASIC programs from GW-BASIC > up to VB6, so check it out at > http://dreael.catty.ch/Deutsch/BASIC-Knowhow-Ecke/MigrationProgramme.... > Note: Use http://babelfish.altavista.com to translate the German text. > Hopefully, that something might be useful for you... :-) > Andreas
Any chance of creating a true English mirror? Babelfish converts most of the words, but there are still enough not converted to leave doubt or even confusion. It's much worse when it garbles source code. Take for example the following snippet. C:\basicprg > gwbasic GW-BASIC 3,23 (C) copyright Microsoft 1983.1984.1985.1986.1987.1988 60300 byte of freely ok one load " meinprog " ok one save " \qbasic\schritt1 ",a ok one system C:\basicprg > CD \qbasic C:\qbasic > The conversion should have been this... C:\basicprg>gwbasic GW-BASIC 3.23 (C) Copyright Microsoft 1983,1984,1985,1986,1987,1988 60300 bytes free ok load "meinprog" ok save "\qbasic\schritt1",a ok system C:\basicprg>CD \qbasic C:\qbasic>_ Or this... TYPE point x AS SINGLE y AS SINGLE END to TYPE TYPE line P1 AS point p2 AS point END to TYPE Should have been... TYPE point x AS SINGLE y AS SINGLE END TYPE TYPE line <== But this would still result in error. p1 AS point p2 AS point END TYPE This has been a real problem for me understanding your many examples of source code (as well as other non-English source code pages) for some time. Now that you know about this problem, you might want consider creating an English mirror. -- Todd Vargo (body of message must contain my name to reply by email)
|
Tue, 27 Jan 2004 10:25:29 GMT |
|
 |
Todd #8 / 25
|
 Please Don't Laugh!
Quote:
> >This has been a real problem for me understanding your many examples of > >source code (as well as other non-English source code pages) for some time. > >Now that you know about this problem, you might want consider creating an > >English mirror. > >-- > >Todd Vargo (body of message must contain my name to reply by email) > I open two brousers, one to read the translation, and one > untranslated to see the code.
What about understanding the authors's explanations? Here is the translation for that snippet. First must .BAS - file in the ASCII format be brought. In addition are the following steps with GWBASIC.EXE necessary (under Windows a request for MS-DOS input is sufficient): As you can see, language conversions don't compensate for proper syntax of the destination language. Also, if the page is a long one, you run across "*** TRANSLATION ENDS HERE ***", so you have to resubmit the text to the converter again. -- Todd Vargo (body of message must contain my name to reply by email)
|
Tue, 27 Jan 2004 14:39:38 GMT |
|
 |
David Wimbu #9 / 25
|
 Please Don't Laugh!
I think you should forget about line by line, either by hand or by some magic sausage machine. You might get there in the end but the resulting VB will not be pretty. VB's event-driven model calls for a different program design than that used in procedural 'line number' BASIC. You have a great opportunity to write a clean program from scratch. Think of it this way: would you rather be on maintenance? Start with the requirements. What is the program for? Who is it for? What goes in? What comes out? What is done between input and output (NB: WHAT is done, not HOW is it implemented in the code)? If nobody can tell you, the existing program can hardly be business critical. Prototype it in VB. Just do the screens and label them so they make sense. Think about how it would be started, what would happen when and so on. Look through the original program and note any bits worth keeping. Most of the code will probably be doing control flow and stuff (ie. GOTOs) but you should be able to find some key algorithms and stuff you can make use of. Good luck.
|
Tue, 27 Jan 2004 17:26:39 GMT |
|
 |
Bil #10 / 25
|
 Please Don't Laugh!
Quote:
> I think you should forget about line by line, either by hand or by > some magic sausage machine.
Sure, if Brad doesn't mind losing his job. One thing that seems clear is that this is not a hobby situation, and there are likely to be non-technical considerations at work. Quote: > You might get there in the end but the resulting VB will not be > pretty.
Not necessarily. It won't be the way a relatively recent graduate would design it from the ground up, but it could very well be every bit as elegant (or ugly) as the original. Quote: > VB's event-driven model calls for a different program design than > that used in procedural 'line number' BASIC.
It ALLOWS such a different design, but does not REQUIRE it. Many such translations have involved little more than popping up a form with a screen-sized rich text box and then dividing the original code between the Form_Load and Text_Change events. Quote: > You have a great opportunity to write a clean program from > scratch. Think of it this way: would you rather be on maintenance?
As opposed to being on unemployment? Quote: > Start with the requirements. What is the program for? Who is it for? > What goes in? What comes out? What is done between input and output > (NB: WHAT is done, not HOW is it implemented in the code)? If nobody > can tell you, the existing program can hardly be business critical.
That would be a bad bet. Many, if not most, businesses rely on Black Box software for mission critical functions - especially those with large bodies of legacy software. In many cases, the only detailed description of "what is done" is the commentary associated with the "how it is done" in the body of the code (as many discovered during the Y2K scare). Do you know EVERY detail of what your car does? Is your car "mission critical" to your lifestyle? Most corporate users of business critical applications are nothing more than 'drivers', and rightly so. It is easy to suggest that other people simply disregard the instructions of their higher-ups, discard thousands of lines of legacy code, and start from scratch. It is rather different when the career at risk is one's own. -- W.E. (Bill) Goodrich, PhD *-----------------------*--------------------------------------------* * CHANGE YOUR {*filter*}ITY * http://www.*-*-*.com/ ~bgoodric/ctg.html * * * *
* Behavior Modification * Creative Technology Group * * or {*filter*} * PO Box 286 * * * Englewood, CO 80151-0286 * *-----------------------*--------------------------------------------*
|
Wed, 28 Jan 2004 01:34:43 GMT |
|
 |
goldenp #11 / 25
|
 Please Don't Laugh!
enjoy. If you are converting from a command line interface then you will have to rewrite most of the program. Perhaps you should consider a shell. If its just a few interface bits and a long bit of algolrithem then its easier. Basic commands are more or less standard, so its just a matter of pasteing it in, fixing the syntex errors and doing a load of debuging. nice crosspost :-)
Quote: > Hello, > I've been asked to re-write a quite extensive 15000 line BASIC program into > Visual Basic. I'm not opposed to going line by line and doing a direct port > over, but... > Are there any utilities that can make this less painful? Something that can > make some simple assumptions and get it closer to VB than just straight > BASIC. I know its not that simple, but I've gotta ask. > Thanks! > Brad
|
Thu, 29 Jan 2004 06:25:08 GMT |
|
 |
Dunn #12 / 25
|
 Please Don't Laugh!
Quote: > Searching my memories banks waaaaaaaaaaaaaay back Timex Sinclair I think > used MSBasic or a very close flavour of it.
Oooh. Try saying *that* in Comp.Sys.Sinclair :) Only joking, but the Sinclair machines used a proprietary Sinclair BASIC. I'm in the process of writing an implentation of it for Win32 PCs now. D.
|
Tue, 10 Feb 2004 06:10:06 GMT |
|
 |
Michael Mattia #13 / 25
|
 Please Don't Laugh!
Quote:
> > Searching my memories banks waaaaaaaaaaaaaay back Timex Sinclair I think > > used MSBasic or a very close flavour of it. > Oooh. Try saying *that* in Comp.Sys.Sinclair :) > Only joking, but the Sinclair machines used a proprietary Sinclair BASIC. > I'm in the process of writing an implentation of it for Win32 PCs now.
Please tell me you are doing this port for the same reason you'd climb a mountain; not because you think there is a market, a need or even any interest in "Sinclair BASIC for Windows." MCM
|
Tue, 10 Feb 2004 08:32:41 GMT |
|
 |
Dunn #14 / 25
|
 Please Don't Laugh!
Quote:
> > > Searching my memories banks waaaaaaaaaaaaaay back Timex Sinclair I > think > > > used MSBasic or a very close flavour of it. > > Oooh. Try saying *that* in Comp.Sys.Sinclair :) > > Only joking, but the Sinclair machines used a proprietary Sinclair BASIC. > > I'm in the process of writing an implentation of it for Win32 PCs now. > Please tell me you are doing this port for the same reason you'd climb a > mountain; not because you think there is a market, a need or even any > interest in "Sinclair BASIC for Windows."
Actually, there's quite a bit of interest in it. It'll grow from a pure implementation of Sinclair BASIC - which includes a window simulating a spectrum screen, and beeper routines with an AY chip emulator thrown in for good measure... I just got peed off with having to type in an emulator. Secondly, there is an interest in applying the model of the BASIC as a framework for a Kids' programming language - a kind of step up to the more complex languages. I learnt spec basic at about seven years old, and there's no way I would have handled Delphi back then :) - And there's no way any child of mine is going to code in VB on my computer :) - there may even be an actual contract in this for me. And thirdly, it's an intellectual exercise for me. Due to the nature of the eventual product, I am putting as much "code helpers" and such in as I can, which opens up areas of actually creating languages that I never knew existed. I'm learning a lot. D.
|
Tue, 10 Feb 2004 10:04:35 GMT |
|
 |
J Fren #15 / 25
|
 Please Don't Laugh!
Quote: >Actually, there's quite a bit of interest in it. It'll grow from a pure >implementation of Sinclair BASIC - which includes a window simulating a >spectrum screen, and beeper routines with an AY chip emulator thrown in for >good measure... I just got peed off with having to type in an emulator. >Secondly, there is an interest in applying the model of the BASIC as a >framework for a Kids' programming language - a kind of step up to the more >complex languages. I learnt spec basic at about seven years old, and there's >no way I would have handled Delphi back then :) - And there's no way any >child of mine is going to code in VB on my computer :) - there may even be >an actual contract in this for me. >And thirdly, it's an intellectual exercise for me. Due to the nature of the >eventual product, I am putting as much "code helpers" and such in as I can, >which opens up areas of actually creating languages that I never knew >existed. I'm learning a lot.
Out of curiosity, what language will you use to write the interpreter?
|
Tue, 10 Feb 2004 19:26:37 GMT |
|
|