FreeBasic Not Very Good Basic Too C Like

Programming, for all ages and all languages.
Post Reply
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

FreeBasic Not Very Good Basic Too C Like

Post by Combuster »

<Continuation>http://forum.osdev.org/viewtopic.php?f= ... 52#p165452</Continuation>
Craze Frog wrote:However, I think FreeBasic isn't a very good basic, because it has a very C-like feel to it. It's not really BASIC, it's C with BASIC syntax (and in some cases, C syntax).
If its a C dialect, it should be trivial to translate this to C for me. Show us, will you. :wink: :^o

Code: Select all

Function DownWithHeretics(a As String, b As String) As String
  Dim p as integer
  Function = b
  p = instr(b, chr$(0))
  if p = 0 then Error 1
  while p > 0
    b = left$(b, p) + a + mid$(b, p+1)
    p = instr(b, chr$(0))
  Wend
  Function = b
End Function
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Craze Frog
Member
Member
Posts: 368
Joined: Sun Sep 23, 2007 4:52 am

Re: building an os with basic

Post by Craze Frog »

Combuster wrote:
Craze Frog wrote:However, I think FreeBasic isn't a very good basic, because it has a very C-like feel to it. It's not really BASIC, it's C with BASIC syntax (and in some cases, C syntax).
If its a C dialect, it should be trivial to translate this to C for me. Show us, will you. :wink: :^o
Ok, so over-exaggerated. What you're doing here is to use some library functions that will not be present for OS-dev. There is no reason for me to start listing code here. Just look at the FreeBASIC documentation to see all the C features. Type names, preprocessor directives, operator syntax and semantics, pointer syntax and semantics. And FreeBASIC lacks the no-hassle it-just-works comfort that is the trademark of BASIC. You have to install the compiler, libraries and a very sparsly integrated IDE separately. This is not the BASIC style.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: building an os with basic

Post by Combuster »

If you have to lie half the time to win this debate, then so be it. I refuse to take this offtopic further.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Craze Frog
Member
Member
Posts: 368
Joined: Sun Sep 23, 2007 4:52 am

Re: building an os with basic

Post by Craze Frog »

Combuster wrote:If you have to lie half the time to win this debate, then so be it. I refuse to take this offtopic further.
This wasn't a debate, I was just making a recommendation to the original poster. I think that the reasons he wanted basic over C for are not satisfiable by the choice of FreeBASIC.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: building an os with basic

Post by Troy Martin »

Craze Frog wrote:
Combuster wrote:
Craze Frog wrote:However, I think FreeBasic isn't a very good basic, because it has a very C-like feel to it. It's not really BASIC, it's C with BASIC syntax (and in some cases, C syntax).
If its a C dialect, it should be trivial to translate this to C for me. Show us, will you. :wink: :^o
Ok, so over-exaggerated. What you're doing here is to use some library functions that will not be present for OS-dev. There is no reason for me to start listing code here. Just look at the FreeBASIC documentation to see all the C features. Type names, preprocessor directives, operator syntax and semantics, pointer syntax and semantics. And FreeBASIC lacks the no-hassle it-just-works comfort that is the trademark of BASIC. You have to install the compiler, libraries and a very sparsly integrated IDE separately. This is not the BASIC style.
When I think BASIC, I think of two types: Basic BASIC (hehe) and Advanced BASIC. Things like QBasic, C64 BASIC, Applesoft BASIC, and so forth fit under Basic BASIC. Under the Advanced BASIC we have the full QuickBASIC (has more features than QBasic), FreeBASIC, VB (blech), and BlitzMax.

I guess you could say that Basic BASIC is the simple stuff like unstructured, minimal structures, and procedural BASICS, while Advanced BASIC is like BASIC with elements of C, C++, and stuff like object-oriented programming and OpenGL functions etc.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: FreeBasic Not Very Good Basic Too C Like

Post by VolTeK »

basic works, it did aid in the development of windows 95 correct?
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: FreeBasic Not Very Good Basic Too C Like

Post by Troy Martin »

GhostXoPCorp wrote:basic works, it did aid in the development of windows 95 correct?
AFAIK Windows 95 was a clutter of C, ASM, and old DOS code. I kind of want to see the source of Windows 95, it might be pretty cool to sift through (especially the comments! Microsoft comments are both foul and pure awesome!)
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: FreeBasic Not Very Good Basic Too C Like

Post by VolTeK »

im not sure they wil even let us see 3.1, some of that might still eb used, or modified to work with or evolutionized for the technology window uses, like from gdi, to windows presentation foundation. even if we could, there would be drawbacks lol in contract or something
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: building an os with basic

Post by jal »

Troy Martin wrote:Things like QBasic, C64 BASIC, Applesoft BASIC, and so forth fit under Basic BASIC. Under the Advanced BASIC we have the full QuickBASIC (has more features than QBasic), FreeBASIC, VB (blech), and BlitzMax.
QBasic is a stripped-down, but still procedural version of QuickBASIC. I think you mean GW-BASIC.


JAL
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: building an os with basic

Post by Troy Martin »

jal wrote:
Troy Martin wrote:Things like QBasic, C64 BASIC, Applesoft BASIC, and so forth fit under Basic BASIC. Under the Advanced BASIC we have the full QuickBASIC (has more features than QBasic), FreeBASIC, VB (blech), and BlitzMax.
QBasic is a stripped-down, but still procedural version of QuickBASIC. I think you mean GW-BASIC.


JAL
Ah yes, that's the one, thanks!
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
Post Reply