Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 17th, 2007, 9:30 AM   #1
HippyVanMan
Newbie
 
Join Date: Feb 2007
Posts: 2
Rep Power: 0 HippyVanMan is on a distinguished road
BASIC - the best sort...

I'm interested in programming in BASIC, but I'd like to here some opinions on the best or most popular cross-platform basic languages, so as I can code under Ubuntu and under XP.
I want to program in BASIC because I'm not a complete idiot and have programmed, albeit poorly in other languages, and BASIC looks very easy to pick up, and I'd like to spend about an hour on it later today, but I don't want to pick a rubbishy dialect of BASIC. I also don't want things like visual basic, or it's linux copy-cats, vb makes me feel ill, i'd like plain old, nice simply, retro, basic. Also, I'd like a compilable variety, I mean, interpreters are good so if theres a sort with an interpreter and a compiler that's good. But I also don't want to code in the sort of basic where the only two known coders are myself and a fifty year old man who lived with his mum in texas.

Thank you for any recommendations or even better links.
HippyVanMan is offline   Reply With Quote
Old Feb 17th, 2007, 11:01 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
BASIC (I presume you mean the original Dartmouth Basic or one of it's derivatives) is a terrible language for programming. I'm a 66-year old man who lived in Texas (with his mum, until age 18); I speak of BASIC, thus, with the requisite authority.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Feb 17th, 2007, 11:16 AM   #3
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4 Arevos is on a distinguished road
BASIC is rare outside the Visual Basic family of dialects, and most BASIC implementations are interpreted. Indeed, the design of BASIC was influenced by the need to make it easily interpreted by computers with little computational power. Additionally, plain BASIC is rather limited as a language, and does not have the best reputation for teaching good programming techniques.

It won't be long before "Python" is mentioned, so I'll mention it now. Python has linguistic similarities to BASIC, whilst having a far larger base of users, and is a programming language frequently recommended to newcomers. It's cross platform, has a large standard library, and whilst it doesn't have a compiler, you can make standalone executables via py2exe.

I'll give you a quick comparison between the two languages, with a small application that prints out the times tables of a user entered number. Here is the application in the QBASIC dialect:
qbasic Syntax (Toggle Plain Text)
  1. PRINT "This application will print out the times table of any number you enter"
  2. INPUT "Please enter a number: ", multiple%
  3. PRINT
  4. FOR %number = 1 TO 12
  5. PRINT number%; " x "; multiple%; " = "; number% * multple%
  6. NEXT %i
And here is the same program in Python:
python Syntax (Toggle Plain Text)
  1. print "This application will print out the times table of any number you enter"
  2. multiple = raw_input("Please enter a number: ")
  3. print
  4. for number in range(1, 13):
  5. print number, "x", multiple, "=", number * multiple
For simple applications, the BASIC code is rather similar to the Python code. However, the advantages of Python are that it is faster, more widely used, and supports more advanced features should the programmer require them. With BASIC, you will hit the wall of what the language is capable of far sooner than with Python.

For instance, in Python its relatively easy to return a list of all URLs linked from a website:
python Syntax (Toggle Plain Text)
  1. import sys
  2. from urllib import urlopen
  3. from urlparse import urljoin
  4. from BeautifulSoup import BeautifulSoup
  5.  
  6. # Get url specified by the first command line argument
  7. url = sys.argv[1]
  8.  
  9. # Parse the HTML of the webpage using the BeautifulSoup parser
  10. soup = BeautifulSoup(urlopen(url))
  11.  
  12. # Iterate over all link tags:
  13. for link in soup.findAll('a'):
  14. if "href" in link.attrs:
  15. print urljoin(url, link["href"]) # print out the full URL of the link
Whilst most variants of BASIC (especially the older ones) don't even have the necessary libraries to access the net in this fashion.
Arevos is offline   Reply With Quote
Old Feb 17th, 2007, 8:58 PM   #4
mrynit
Hobbyist Programmer
 
mrynit's Avatar
 
Join Date: Mar 2006
Location: olympia,WA
Posts: 332
Rep Power: 3 mrynit is on a distinguished road
Send a message via AIM to mrynit Send a message via MSN to mrynit Send a message via Yahoo to mrynit Send a message via Skype™ to mrynit
you want http://freebasic.net/
Quote:
FreeBASIC - as the name suggests - is a completely free, open-source, 32-bit BASIC compiler, with the syntax the most compatible possible with MS-QuickBASIC, that adds new features such as pointers, unsigned data types, inline-assembly and many others
FreeBASIC can use alot of 32bit dll files like winsock allegro sdl openGl and much more. its a great langauge to make simple games.

FreeBASIC is crossplatform linux DOS and windows.
__________________
i dont know much about programming but i try to help
mrynit is offline   Reply With Quote
Old Feb 17th, 2007, 10:21 PM   #5
Indigno
Professional Programmer
 
Indigno's Avatar
 
Join Date: Dec 2005
Location: Anywhere non-productive
Posts: 267
Rep Power: 0 Indigno is an unknown quantity at this point
Send a message via AIM to Indigno Send a message via MSN to Indigno Send a message via Yahoo to Indigno
Qbasic really isn't good for more than making simple games or just screwing around with. If that's what you plan on doing, then ^.
__________________
Perhaps I should have a sticky topic for all of the times I "return" to this forum instead of a new one every time.
Indigno is offline   Reply With Quote
Old Sep 23rd, 2007, 6:43 PM   #6
Grich
Hobbyist Programmer
 
Grich's Avatar
 
Join Date: Sep 2007
Location: Sydney - Australia
Posts: 148
Rep Power: 1 Grich is on a distinguished road
I am a big BASIC fan. It was my first language.
The Quick BASIC compiler / IDE is still good. I run it on my XP platform, and it is still happy. It is hard to find, but, search for Quick Basic 4.5 or go to phatcode.net and look on the compiler page for version 4.5.
I used FreeBasic as while, and I HATE it. Too New School. I like old school.
Also, some of the new student calculators have the BASIC language built in for macros, it is very powerful though.
Hope this information helps.
Grich is offline   Reply With Quote
Old Sep 23rd, 2007, 7:03 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Please try to avoid dragging up old threads.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
converting string to float beginnerCCC C 22 Oct 2nd, 2006 11:59 PM
sort and swap brad sue C 1 Mar 25th, 2006 6:33 AM
[ANN] New script engine (Basic sintax) MKTMK C++ 3 Sep 1st, 2005 5:51 PM
interpolation search on a million EverLearning C 24 Jun 15th, 2005 2:42 PM
threaded merge sort help AusTex C 1 May 1st, 2005 4:58 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:51 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC