473,804 Members | 4,153 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2669
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.goo glegroups.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.javas cript:
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.javas cript:
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.or g/wiki/GOTOlink:

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

also: <http://en.wikipedia.or g/wiki/Edsger_Dijkstra >
or: <http://nl.wikipedia.or g/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.javas cript:
<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.javas cript:
Evertjan. wrote:
>Bart Van der Donck wrote on 09 aug 2006 in comp.lang.javas cript:
<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.javas cript:
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

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

Similar topics

303
17803
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. Yahoo store was originally written in Lisp. c. Emacs The issues with these will probably come up, so I might as well mention them myself (which will also make this a more balanced
7
9293
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. # No warranty express or implied for the accuracy, fitness to purpose
31
9145
by: Brad | last post by:
Without going into detail, how do you make games in C++?
6
12995
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 shifting the bits the decryption doesn't work.. :P Am I going about this all wrong or does anybody know an easier way (besides getting an open source algo class such as Crypto++) I'm super new to fooling with the bits/encryption
2
2111
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 purchase it anymore, anywhere we know. Therefore, I would like to know whether is VB 6 still available in the market? If not, is there any way we can 'downgrade' our license to VB 6 for a just short period of time, about 2 months. What other...
7
1861
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 forms in an application to find out something, such as if a particular form it loaded, or how many of a particular type of form are loaded. Windows Forms does not include a Forms collection, however, so gaining such functionality in Visual Basic...
13
1774
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" on the screen. Greetings Tobias
7
10767
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 any idea how I can determine this? At this point I don't care if it is a third plugin freeware app I use that writes it to a text file that I could read out. Thanks!
41
3538
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 on the web. I'm completely new to the server technology stuff and don't need anything expensive - only for testing purposes and so other web artists can see my work and give me their opinion/suggestions. What is the process of getting...
0
9707
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9585
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10586
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.