Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Getting an old BASIC program to run online

Reply
Thread Tools

Getting an old BASIC program to run online

 
 
trippeer@gmail.com
Guest
Posts: n/a
 
      08-07-2006
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).

 
Reply With Quote
 
 
 
 
John Fredrickson
Guest
Posts: n/a
 
      08-08-2006
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

<> wrote in message
news: 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).
>



 
Reply With Quote
 
 
 
 
trippeer@gmail.com
Guest
Posts: n/a
 
      08-08-2006
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


 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      08-08-2006
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)
 
Reply With Quote
 
Bart Van der Donck
Guest
Posts: n/a
 
      08-09-2006
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

 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      08-09-2006
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/GOTO> link:

"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)
 
Reply With Quote
 
Bart Van der Donck
Guest
Posts: n/a
 
      08-09-2006
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

 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      08-09-2006
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)
 
Reply With Quote
 
Bart Van der Donck
Guest
Posts: n/a
 
      08-09-2006
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

 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      08-09-2006
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)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Old program won't run in XP Why Computer Support 4 11-27-2007 09:16 PM
online games, free online games, games to play online princess Computer Support 0 05-13-2007 10:58 AM
online games, free online games, games to play online princess Computer Support 0 05-10-2007 09:25 AM
online games, free online games, games to play online princess Computer Support 0 05-10-2007 09:23 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57