Qbasicnews.com
freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: General (http://qbasicnews.com/newforum/forum-6.html)
+--- Forum: General/Misc (http://qbasicnews.com/newforum/forum-18.html)
+--- Thread: freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. (/thread-4948.html)

Pages: 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


freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. - relsoft - 11-05-2004

Well poke could be done really. But in a lil different syntax


like:

Code:
Poke8 lpsurface,offset, char
Poke16 lpsurface,offset, word
poke32 lpsurface,offset, dword

l


freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. - Neo - 11-05-2004

Wink

Wow, Rel that piece of code looks awesome! (Btw, why don't you use inline assembly :rollSmile.

Also, maybe the FB preprocessor should parse the QB's POKE calls to Poke8 calls. That way it will be 100% QB compatible.

Anyway, I agree that all QB commands should be included in the FB package, to make it 100% compatible with already existing programs.

Btw, can you also use part of QBMCX's syntax? That'll prevent me from converting all my programs (hehe Wink)


freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. - relsoft - 11-05-2004

Quote:Wow, Rel that piece of code looks awesome! (Btw, why don't you use inline assembly :rollSmile.

Can't. This proggie is for a bunch of Comp Sci students for their project defense. So I need to code in C/C++ only. I get paid for it. This is perfect. I'm learning C/C++ and getting paid for it. ;*)


Btw, do you know how to allocate the torus array inside a function? Like the load_torus func?


freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. - Neo - 11-05-2004

I'll take a more closer look at your code Smile


freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. - relsoft - 11-05-2004

Thanks!!!

I also used new since I don't know how to farmalloc multiple structures.


freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. - Neo - 11-05-2004

Heh, my compiler moaned on the keyword new Smile I selected a "C-Style program" and it didn't compile. #1: new is for C++. #2: My compiler doesn't support far Sad

Oh well. Anyway, AFAIK, you can't create structures with malloc.

{ code removed because it didn't work after some tests Wink }

Hmn, there must be a simpler way, I read about it somewhere. Too bad I don't have time now, I'll have to look it up some time Sad

Quote:Can't. This proggie is for a bunch of Comp Sci students for their project defense. So I need to code in C/C++ only. I get paid for it. This is perfect. I'm learning C/C++ and getting paid for it. ;*)
Awesome! Tongue


freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. - adosorken - 11-05-2004

Although I think that all of QB's syntax should be maintained, I'm not suggesting that it become a straightjacket. Big Grin Certain statements/functions should simply be wrapped to other functions. But if that doesn't seem plausible, then it's not going to be 100% QB compatible.

But actually, is it really necessary to be 100% compatible? I mean honestly, aren't there better ways of doing certain things nowadays? FB is already leaps and bounds beyond QB. It might be more work than it's worth to shoot for 100% compatibility. I shot for about 95% compatibility with OBDS. Big Grin There's just certain things that are probably not worth the effort when going from DOS to Windows.


freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. - Blitz - 11-05-2004

In my opinion, a languages power is not defined but how many commands it has. It's what you can do with the commands you have. With pointers there are endless possibilities. A languages should be small, tight and fast. And you should be able to link with the os standard lib format. If you can do that there's nothing you can't do. This is what C is, and exactly what FB is.

Including 100s of commands is lame and ugly. This is what darkbasic and blitxbasic does. Powerbasic, a powerful compiler. But it couldn't be linked with the os standard lib format, that's why it never got very popular. Nah, link with whatever lib you want and you got what you need.

Oh and i can assure you that emulating the dos adress space will never happen. FB is not a emulator, it's a qb like dialect. And when you do OS specific stuff like poking into the video memory your no longer doing qb stuff. So, 100% qb compatible does not mean 100% dos hack compatible.


freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. - Z!re - 11-05-2004

Simply put, victor is aiming for 100% QB SYNTAX compatibility, not 100% QB compatibility (Call absolute anoyone?, defseg and poke/peek anyone?)


Anyways, it sounds better and better by the day, I hope we'll see a test version soon.


freeBASIC (a 32-bit QB-syntax compatible compiler) preview.. - Jofers - 11-05-2004

OMG 7HI$ IS TEH FUTURE M$ CAN SUXOR MY 817CH3$ IM PROGGING DOOM3FB NOW BUT 1 N33D S0M30N3 70 PU7 IN DRAW V3CZOR CAN U PUT IN DRAW??

...

Aaanyways, I gots to agree with vic and his PR rep Blitz. One of the bottlenecks with other basic compilers is you always have to include some rediculous runtime for a HUGE executable size, and if you have some giant base graphics interface it discourages using new and updated routines in libararies and learning more advanced interfaces like DX and OGL and such - also you have to wait for a new compiler release to get faster graphics.

Besides - PLAY, SOUND, BEEP, DRAW, WINDOW, CIRCLE are all routiens that don't translate well to something like Windows where everything is virtualized and you can't just tap right into the hardware. You would either have to use some severly restricting and oversimplified graphics wrappers or port your code to the new commands anyways. Your programs will be easy enough to port if you programmed them well (IE, not depending on a string of GOTOs and PUTs and such, but rather putting tasks in subroutines, and removing your main code from the hardware).

Oh yeah... just one question: FB seems to be 100% procedural like it's predecessor in spirit, but will there be means to "fake" OO programming? Like throwing self-referencing functions into structures, or hack object support like with C++ or PHP/Perl/Javascript?