473,226 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

Getting an old BASIC program to run online

I have the source code to an old BASIC program that a friend of mine
would like to run online. I am a beginner at JS, but I think that it
would be a good choice for the project. My background is in C/C++ and
web development.

Any suggestions that might get me off to a good start here? I can
provide more information if needed, but I am not sure what would be
helpful. The program is 550 lines in what appears to be BASIC and is a
calendar conversion program. You give it a date and it will convert it
into one of many other date reckoning systems (Gregorian, Hebrew,
Egyptian, etc, etc).

Aug 7 '06 #1
10 2633
Trippeer,

Is your intention to convert the program from BASIC to JavaScript?

What version of BASIC is the program written in?

If you are just looking for a free BASIC interpreter, you can find several
on-line:

Just Basic http://www.justbasic.com or
Digital Basic http://hp.vector.co.jp/authors/VA008...lish/index.htm or
Chipmunk Basic http://www.nicholson.com/rhn/basic/ or
Small Basic http://smallbasic.sourceforge.net

John Fredrickson

<tr******@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
>I have the source code to an old BASIC program that a friend of mine
would like to run online. I am a beginner at JS, but I think that it
would be a good choice for the project. My background is in C/C++ and
web development.

Any suggestions that might get me off to a good start here? I can
provide more information if needed, but I am not sure what would be
helpful. The program is 550 lines in what appears to be BASIC and is a
calendar conversion program. You give it a date and it will convert it
into one of many other date reckoning systems (Gregorian, Hebrew,
Egyptian, etc, etc).

Aug 8 '06 #2
Yes, I would like to convert it to JS. As far as I know, I cannot get
it to run in a web page as is, so I plan on using the source code to
decipher the logic and rewrite it in JS.

I don't know what version of BASIC, but it seems pretty
straightforward. Lots of GOSUBS and GOTOs, and the arrays are populated
with a FOR/NEXT construction with READ and DATA keywords.

John Fredrickson wrote:
Trippeer,

Is your intention to convert the program from BASIC to JavaScript?

What version of BASIC is the program written in?

If you are just looking for a free BASIC interpreter, you can find several
on-line:

Just Basic http://www.justbasic.com or
Digital Basic http://hp.vector.co.jp/authors/VA008...lish/index.htm or
Chipmunk Basic http://www.nicholson.com/rhn/basic/ or
Small Basic http://smallbasic.sourceforge.net

John Fredrickson
Aug 8 '06 #3
tr******@gmail.com wrote on 08 aug 2006 in comp.lang.javascript:
John Fredrickson wrote:
>Trippeer,

Is your intention to convert the program from BASIC to JavaScript?

What version of BASIC is the program written in?

If you are just looking for a free BASIC interpreter, you can find
several on-line:

Just Basic http://www.justbasic.com or
Digital Basic
http://hp.vector.co.jp/authors/VA008...lish/index.htm or Chipmunk
Basic http://www.nicholson.com/rhn/basic/ or Small Basic
http://smallbasic.sourceforge.net
[please do not toppost on usenet]
Yes, I would like to convert it to JS. As far as I know, I cannot get
it to run in a web page as is, so I plan on using the source code to
decipher the logic and rewrite it in JS.

I don't know what version of BASIC, but it seems pretty
straightforward. Lots of GOSUBS and GOTOs, and the arrays are
populated with a FOR/NEXT construction with READ and DATA keywords.
Automatic conversion is impossible, methinks.

Suggestion:
Try to understand the programme and write a JS programme
that has the same effect.

Modern progamming is module oriented, so the "goto" concept, heavily
attacked by Dijkstra in the 1970s, has been removed from the modern
language versions. and rightly so.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 8 '06 #4
Evertjan. wrote:
[...]
Modern progamming is module oriented, so the "goto" concept, heavily
attacked by Dijkstra in the 1970s, has been removed from the modern
language versions.
<quote>
GOTO is found in FORTRAN, Algol, COBOL, SNOBOL, BASIC, Common Lisp, C,
C++, C#, D, Pascal, Perl, PHP6 and many other languages.
</quote>

http://en.wikipedia.org/wiki/GOTO

--
Bart

Aug 9 '06 #5
Bart Van der Donck wrote on 09 aug 2006 in comp.lang.javascript:
Evertjan. wrote:
>[...]
Modern progamming is module oriented, so the "goto" concept, heavily
attacked by Dijkstra in the 1970s, has been removed from the modern
language versions.

<quote>
GOTO is found in FORTRAN, Algol, COBOL, SNOBOL, BASIC, Common Lisp, C,
C++, C#, D, Pascal, Perl, PHP6 and many other languages.
</quote>

http://en.wikipedia.org/wiki/GOTO
"modern language _versions_" of _BASIC_,
thought that was obvious, Bart.

In your <http://en.wikipedia.org/wiki/GOTOlink:

"One famous criticism of GOTO is a 1968 letter by Edsger Dijkstra
called Go To Statement Considered Harmful."

also: <http://en.wikipedia.org/wiki/Edsger_Dijkstra>
or: <http://nl.wikipedia.org/wiki/Edsger_Dijkstra>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 9 '06 #6
Evertjan. wrote:
Bart Van der Donck wrote on 09 aug 2006 in comp.lang.javascript:
<quote>
GOTO is found in FORTRAN, Algol, COBOL, SNOBOL, BASIC, Common Lisp, C,
C++, C#, D, Pascal, Perl, PHP6 and many other languages.
</quote>

http://en.wikipedia.org/wiki/GOTO

"modern language _versions_" of _BASIC_,
thought that was obvious, Bart.
AFAIK GOTO should be present in all Basic versions/variants. I agree it
should not be used too much (just common 'structural' sense), but you
don't need GOTO to write spaghetti code :-)

--
Bart

Aug 9 '06 #7
Bart Van der Donck wrote on 09 aug 2006 in comp.lang.javascript:
Evertjan. wrote:
>Bart Van der Donck wrote on 09 aug 2006 in comp.lang.javascript:
<quote>
GOTO is found in FORTRAN, Algol, COBOL, SNOBOL, BASIC, Common Lisp, C,
C++, C#, D, Pascal, Perl, PHP6 and many other languages.
</quote>

http://en.wikipedia.org/wiki/GOTO

"modern language _versions_" of _BASIC_,
thought that was obvious, Bart.

AFAIK GOTO should be present in all Basic versions/variants. I agree it
should not be used too much (just common 'structural' sense), but you
don't need GOTO to write spaghetti code :-)
That may be your opinion, Bart.
I tend, after many years of doubt, to agree with Dijkstra it should not.

Fact is it is not present in VB and VBS,
the only "modern versions" of Basic I know of..
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 9 '06 #8
Evertjan. wrote:
[...]
Fact is it [GOTO] is not present in VB and VBS,
the only "modern versions" of Basic I know of..
http://msdn2.microsoft.com/en-us/library/69whc95c.aspx

--
Bart

Aug 9 '06 #9
Bart Van der Donck wrote on 09 aug 2006 in comp.lang.javascript:
Evertjan. wrote:
>[...]
Fact is it [GOTO] is not present in VB and VBS,
the only "modern versions" of Basic I know of..

http://msdn2.microsoft.com/en-us/library/69whc95c.aspx
I am disgusted.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 9 '06 #10
Tripper,

There is no automated conversion system that I know of for going from an old
BASIC to JavaScript. It would be best if you analyzed the program and
documented its behavior and then rewote it by hand. A BASIC compiler or
interpreter may come in handy to guarantee that the new JavaScript program
behaves identically to the old BASIC program.

Perhaps you would like to share the BASIC source code so we can experiment
with it.

John Fredrickson

<tr******@gmail.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
Yes, I would like to convert it to JS. As far as I know, I cannot get
it to run in a web page as is, so I plan on using the source code to
decipher the logic and rewrite it in JS.

I don't know what version of BASIC, but it seems pretty
straightforward. Lots of GOSUBS and GOTOs, and the arrays are populated
with a FOR/NEXT construction with READ and DATA keywords.

Aug 10 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
31
by: Brad | last post by:
Without going into detail, how do you make games in C++?
6
by: Richard | last post by:
I'm looking to do my own basic encryption. I've been tyring to do a concept such as: I pass this function the string, key and number of rounds I want to do the encryption. because im round...
2
by: janice_2k | last post by:
Dear Sir/Mdm, I am writing this on behalf of my company. We bought the Visual Studio .NET Enterprise version but currently we need to use Visual Basic 6 for a small development. We are not able to...
7
by: gerryLowry::Ability Business Computer Services {KC | last post by:
"Getting Back Your Visual Basic 6.0 Goodies" by Billy Hollis, 2003-5-14, states: "Getting a Forms Collection Visual Basic 6.0 developers are often fond of looping through the currently loaded...
13
by: ThaDoctor | last post by:
I would like to get started with programming in C, but I cant get it to work, I do not need any compiler or such. Only a basic explanation of the first program Hello World that print "Hello World"...
7
by: Joey | last post by:
I don't care what .net language this come in but I really need to determine if a disk is dynamic or basic. I have posted something in the WMI group but no one knows how to do it. Does anyone have...
41
by: LayneMitch via WebmasterKB.com | last post by:
I was just chating with a few webdevelopers and it was brought to my attention that I need some type of server technology installed on my computer so I could get a visual of how my sites would look...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.