Pete's QBASIC Site Forum Index Pete's QBASIC Site
Return to Pete's QBasic Site
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is FB QB in disguise?
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Pete's QBASIC Site Forum Index -> Freebasic Questions & Answers
View previous topic :: View next topic  
Author Message
dinokilla



Joined: 07 Jan 2008
Posts: 12

PostPosted: Mon Jan 07, 2008 7:21 pm    Post subject: Is FB QB in disguise? Reply with quote

Can I compile QB code in FB or is it alot different? I used to program in QB awhile back and lately I've been programming in C++. I decided I just want to make some simple 2d side scrollers and rpgs now so...I know QB is very good for that, is FB the same? Or better???
Back to top
View user's profile Send private message
Nodtveidt



Joined: 25 Jul 2004
Posts: 826
Location: Quebradillas, PR

PostPosted: Mon Jan 07, 2008 8:17 pm    Post subject: Reply with quote

Most of normal QB will compile in FB. Older versions of FB are better for it though, as the compiler's gotten kind of convoluted lately. Anyways, it's pretty easy to make simple games in FB because of its powerful built-in graphics library that works similar to QB only 10000x better. Some things don't quite work right (such as DRAW) but a serious game programmer isn't going to use that archaic function anyways. But for blitting, it's ace. You get extra options too, such as "automasking", alpha blending, and true color, high resolution screen modes...all things you needed libraries for in QB.

Oh and I should warn you...there's a few people on this forum who have a hatred for FB. Pay no attention to them, as they are merely trolls looking for a snack.
_________________
NDS Uncensored
A Little de Todo
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
dinokilla



Joined: 07 Jan 2008
Posts: 12

PostPosted: Mon Jan 07, 2008 9:13 pm    Post subject: Reply with quote

Wow that sounds good, Does it have documentation with it explaining the differences with qbasic? I wouldn't be using the DRAW function but definately blitting and general sprite stuff. I've always known QB was slow but I'm not trying to make money or anything I just like programming for the fun of it and QB has always made that easy so if FB has similar ease of programming with a bit more speed/functionality that sounds sweet. I like your little video you have in place of your avatar. Very Happy Can't quite make out what he's saying though...HAHA Yea there will always be people that talk trash about the particular language you are learning. If I took other peoples advice there would be no good language to program in at all. Anyways, thanks for your input...I know I could have looked it up myself but I've been on Pete's site here checking out all the stuff and brushing up on my QB syntax lol. I will definately give FB a try.
Back to top
View user's profile Send private message
bungytheworm



Joined: 18 Feb 2006
Posts: 289

PostPosted: Mon Jan 07, 2008 10:59 pm    Post subject: Reply with quote

There is pretty decently explained differences between QB and FB at the wiki http://www.freebasic.net/wiki/wikka.php?wakka=CatPgFullIndex
Example, in draw there reads Differences from QB: QB used the special pointer keyword VARPTR$ with the Xp command..
I am not 100% aware how update wiki is bot havent got much problems with it this far.

And as Nodtveidt told, be warned. Here are bitter QB peoples around. Gladly, there are only few and most of QB users are cool and friendly peoples.
_________________
BasicProgramming.Org
Back to top
View user's profile Send private message
dinokilla



Joined: 07 Jan 2008
Posts: 12

PostPosted: Tue Jan 08, 2008 12:32 am    Post subject: Reply with quote

wow I was expecting a slightly updated dos compiler but wow...32bit integers and pointers, it's working it's way toward C, I can see why QB purists might not like it... Alot more up to date than I ever expected though! Is there an IDE that anyone would recommend? I don't NEED one but...if there is a decent one...
Back to top
View user's profile Send private message
Nodtveidt



Joined: 25 Jul 2004
Posts: 826
Location: Quebradillas, PR

PostPosted: Tue Jan 08, 2008 2:57 am    Post subject: Reply with quote

FBedit is pretty good, I've heard. The only one I ever used was FBIDE, which is now apparently quite outdated. I code everything in Notepad nowadays anyways. Smile
_________________
NDS Uncensored
A Little de Todo
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
bungytheworm



Joined: 18 Feb 2006
Posts: 289

PostPosted: Tue Jan 08, 2008 5:46 am    Post subject: Reply with quote

dinokilla wrote:
Is there an IDE that anyone would recommend? I don't NEED one but...if there is a decent one...

I use simple but neat one; http://www.gnome.org/projects/gedit/ Wink
_________________
BasicProgramming.Org
Back to top
View user's profile Send private message
coderJeff



Joined: 08 Jan 2008
Posts: 16

PostPosted: Tue Jan 08, 2008 8:34 am    Post subject: Reply with quote

Nodtveidt wrote:
Most of normal QB will compile in FB. Older versions of FB are better for it though, as the compiler's gotten kind of convoluted lately.


Below are portions of the compiler change log that specifically target QB compatibility related issues since the addition of "-lang qb" in version 0.17.

These updates were made throughout the version 0.17 up to version 0.18.4 (SVN):
- added the -lang command-line option, to allow language compatibility without keeping FB from progress, see the migrating.txt file (v1c)
- lang qb: DATA should be allowed inside compound-statements (v1c)
- lang qb: MKI/CVI now return 16-bit sized results (counting_pine)
- lang qb: INTEGER (%) and LONG (&) are now, respectively, 16- and 32-bit wide (v1c)
- lang qb: default numeric literals are now assumed to be INTEGER or SINGLE (v1c)
- lang qb: symbols with the same name as keywords are now allowed: dim left as integer: const dim$ = "" etc (v1c)
- lang qb: all data types and functions/keywords not present in QuickBASIC were removed (v1c)
- lang qb: SLEEP(n) expects seconds (feature request #1718012) (jeffm)
- lang qb: INKEY$ returns CHR$(0) as the extended character (feature request #1718012) (jeffm)
- SCREEN now follows the QB syntax in -lang qb (v1c)
- RND is now 100% compatible with QB in -lang qb mode (patch written by counting_pine)
- ERASE is now compatible with QB, that is when ERASE is called on a variable-length array, the bounds information is reset in addition to the data being destroyed (cha0s)
- -lang qb now skips UDT alignment by default (cha0s)
- LOCATE will now accept a full 5 args to be compatible with QB, however the final 2 args have no effect (cha0s)
- STR will now pad positive numbers with a single space, as in QB, but ONLY if -lang qb is used (cha0s)
- OPEN now is more compatible with QB, the file/device is parsed at runtime (cha0s)
- fixed #1790722 - INPUT wasn't prompting with a '?' if no prompt string was given (cha0s)
- lang qb: STICK(n) and STRIG(n) functions (jeffm)
- added error when NEXT var does not match FOR var (jeffm)
- added First version of COM/serial support for DOS, W.I.P. (jeffm)
- cursor support for INPUT/LINE INPUT in GFX modes (v1c)
- 'PCOPY [srcPg] [, dstPg]' and 'SCREEN [, activePg] [, visiblePg]' for non-graphic, console, screen 0 mode - for DOS and Windows only (v1c)

Although fbc-0.16 most certainly broke stuff, since version fbc-0.17 there has been an on going effort by all developers to improve QB compatibility. Of course some popular "Normal QB" won't compile, but the common issues are on the TODO list.

Last released version of fbc is 0.18.3.

EDIT:
The items listed in the changelog above were made in versions 0.17 through 0.18.4 (SVN).


Last edited by coderJeff on Tue Jan 08, 2008 6:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
dinokilla



Joined: 07 Jan 2008
Posts: 12

PostPosted: Tue Jan 08, 2008 11:51 am    Post subject: Reply with quote

Thanks for the info, I can't remember being this excited about a new compiler since I first began programming! I will check out some of those IDE's, although I'm getting along pretty well without one so far. Thanks for all the help! I'll be back eventually with a problem I'm sure. Very Happy
Back to top
View user's profile Send private message
burger2227



Joined: 21 Aug 2006
Posts: 1267
Location: Pittsburgh, PA

PostPosted: Tue Jan 08, 2008 3:46 pm    Post subject: Reply with quote

FB is just C code in disguise! Learn C and there will be no compatability problems. But you will have to convert Basic code to the C language.

Why learn a language that is so constantly updated in the first place? Even Nod only uses the old, mostly QB compatible version of FB. Seems like FB changes every update nowadays. That means you may have to revise your code too! A recent update requires you to redo the libraries also.

Still King!,

Ted
_________________
Please acknowledge that you have read an answer!
QB64 is a FREE QBasic compiler for 64 bit WIN, MAC and LINUX : QB64 WIKI
Get my Q-Basics demonstrator here:Q-Basics.zip
Back to top
View user's profile Send private message Send e-mail
Seb McClouth



Joined: 09 Nov 2005
Posts: 342
Location: Inside the Matrix...

PostPosted: Tue Jan 08, 2008 5:09 pm    Post subject: Reply with quote

Maybe FreeBasic should be split up in FreeBasic and FreeFutureBasic or something.

Basic was created to provide access for non-science students to computers. At the time, nearly all use of computers required writing custom software, which was something only scientists and mathematicians tended to do.

The eight design principles of BASIC were:

1. Be easy for beginners to use.
2. Be a general-purpose programming language.
3. Allow advanced features to be added for experts (while keeping the language simple for beginners).
4. Be interactive.
5. Provide clear and friendly error messages.
6. Respond quickly for small programs.
7. Not to require an understanding of computer hardware.
8. Shield the user from the operating system

Seems like were way past that. Don't get me wrong, I don't think FreeBasic is bad but C is just not Basic to me. Then we might as well call FreeBasic FreeC or sumfin.
_________________
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.


Last edited by Seb McClouth on Wed Jan 09, 2008 1:18 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
coderJeff



Joined: 08 Jan 2008
Posts: 16

PostPosted: Tue Jan 08, 2008 6:25 pm    Post subject: Reply with quote

seb, 1 2 3 4 5 6 6 7?
Thanks, http://en.wikipedia.org/wiki/BASIC_programming_language

burger2227, you are absolutely correct: Want to get a job in programming? *Basic* probably won't help. And yes, FreeBASIC libraries need to be recompiled due to name mangling bugs. Please send your cheques payable to "The FreeBASIC Development Team" immediately so we can finally pay the workers in our closed beta testing group and prevent this from happening again. Thanks.

Btw, the changes listed in my previous post were made throughout versions 0.17 through 0.18.4(SVN).
Back to top
View user's profile Send private message
dinokilla



Joined: 07 Jan 2008
Posts: 12

PostPosted: Tue Jan 08, 2008 10:33 pm    Post subject: Reply with quote

FB might be close to C but it's not C. It's kinda like I wouldn't use a saw to pound in a nail and I wouldn't use a hammer to try and cut a piece of wood. In my opinion each language/compiler can be used for different things. C is great for alot of things but when I decided to go back to making some simple math tutor programs for my little sister and thinking about making some simple rpgs and sidescrollers I found myself creating a whole bunch of functions just to make programming the games easier. I remembered that QB had most of these functions already built in so...I bagged it and came here where on the main page I saw a reference to FB and inquired about it, and here I am. Computers are so fast these days, if I made a program in QB or FB and made the same program in C I don't think you would notice a HUGE difference in speed. I'm definately not an expert but thats just my viewpoint, why make something more difficult and time consuming than it has to be? If I was trying to make some commercial program and make money off it of course I wouldn't use basic y'know? Use the right tool for the job, each compiler and language has it's pro's and con's. Sometimes you can even mix different capabilities of languages together!! Why do people that dislike FB go into the FB forum anyways? Enough ranting for me hehehe.
Back to top
View user's profile Send private message
coderJeff



Joined: 08 Jan 2008
Posts: 16

PostPosted: Tue Jan 08, 2008 10:47 pm    Post subject: Reply with quote

dinokilla, if you want to get an idea of the differences between QBasic, QB45, FreeBASIC and its dialects you might find these tables useful:

http://www.execulink.com/~coder/fb/docs/fb_compare_keywords.html
http://www.execulink.com/~coder/fb/docs/fb_compare_feature.html

Each keyword links to the on-line wiki (FreeBASIC manual). Sorry, the tables are a few weeks old.
Back to top
View user's profile Send private message
dinokilla



Joined: 07 Jan 2008
Posts: 12

PostPosted: Tue Jan 08, 2008 11:41 pm    Post subject: Reply with quote

Thanks for the info Jeff, the more info the better. Very Happy FB seems pretty straight forward so far. I've been doing more experimenting than reading but as long as I can remember that I'm not programming in DOS I should be ok. I tried using the SCREEN function like old QB...oops. No seg/offset either lol. I haven't programmed in basic for so long it's hard to break the habit but as far as I can tell most of the changes are pretty beneficial. Thanks everyone for the help and info!! I think I'm hooked...
Back to top
View user's profile Send private message
bungytheworm



Joined: 18 Feb 2006
Posts: 289

PostPosted: Wed Jan 09, 2008 2:05 pm    Post subject: Reply with quote

err...peoples who claims that FB is more C than BASIC should now go and learn some C.
And to remind, QB <> original concept of BASIC. It is closer to basic than FB but so what?
There is "BASIC" dialects out there which dont have even functions such as PRINT, DIM, INPUT, REM etc. and i dont see you peoples there messing around how that XXXbasic is not basic.

Dont you ever get tired for these?
_________________
BasicProgramming.Org
Back to top
View user's profile Send private message
SMC



Joined: 09 Jan 2008
Posts: 20

PostPosted: Wed Jan 09, 2008 2:46 pm    Post subject: Reply with quote

I use FB instead of C because it brings everything together in a nice and neat little package. For some reason once you get out of ANSI C everything wants to become complicated and convoluted. I also like being able to, quickly, get something on the screen to play around with like I can with FB. That being said, I'm also of the same opinion as Nodtveidt in that I don't bother with newer releases. (still using version .16)
Back to top
View user's profile Send private message
bungytheworm



Joined: 18 Feb 2006
Posts: 289

PostPosted: Wed Jan 09, 2008 2:54 pm    Post subject: Reply with quote

http://ascii-world.wikidot.com/freebasic-15b
_________________
BasicProgramming.Org
Back to top
View user's profile Send private message
coderJeff



Joined: 08 Jan 2008
Posts: 16

PostPosted: Thu Jan 10, 2008 11:41 am    Post subject: Reply with quote

DEF SEG is technically possible, but what is missing is the cross-platform emulation layer. (bios data area will be loads of work). More info:
http://www.freebasic.net/forum/viewtopic.php?t=10297

I can repsect that some users want to continue using older versions of FB that work for them, but imo advertising old versions of the compiler does not help the project in general. FBIDE is probably the biggest culprit since it has been abandoned at fbc-0.15 but continues to be a popular starting point for getting in to FB.

Latest version of fbc here:
http://www.freebasic.net/index.php/download

Serious question: if users are still using versions <= 0.16, what would it take to get them to try newer versions?
Back to top
View user's profile Send private message
bungytheworm



Joined: 18 Feb 2006
Posts: 289

PostPosted: Thu Jan 10, 2008 12:19 pm    Post subject: Reply with quote

coderJeff wrote:
Serious question: if users are still using versions <= 0.16, what would it take to get them to try newer versions?


Hi Jeff.

I guess music would be good example here. If i have bought all albums from BandX this far since i like them but then i hear few songs of their next release, and i dont like it why should i buy that album? And even if i get it for free, why should i listen it if i dont like that new music style?
Is the reason in me or in that album? Peoples are same, only thing that has changed is that music.

Personally im fine with latest versions but i do understand peoples who sticks at .15 or .16.
_________________
BasicProgramming.Org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Pete's QBASIC Site Forum Index -> Freebasic Questions & Answers All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
Protected by Anti-Spam ACP