Page 1 of 1

FreeBasic Not Very Good Basic Too C Like

Posted: Wed Sep 09, 2009 1:03 pm
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

Re: building an os with basic

Posted: Thu Sep 10, 2009 4:30 am
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.

Re: building an os with basic

Posted: Thu Sep 10, 2009 5:34 am
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.

Re: building an os with basic

Posted: Fri Sep 11, 2009 1:30 pm
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.

Re: building an os with basic

Posted: Fri Sep 11, 2009 4:51 pm
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.

Re: FreeBasic Not Very Good Basic Too C Like

Posted: Fri Sep 11, 2009 5:38 pm
by VolTeK
basic works, it did aid in the development of windows 95 correct?

Re: FreeBasic Not Very Good Basic Too C Like

Posted: Fri Sep 11, 2009 5:42 pm
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!)

Re: FreeBasic Not Very Good Basic Too C Like

Posted: Fri Sep 11, 2009 7:40 pm
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

Re: building an os with basic

Posted: Wed Sep 16, 2009 5:58 am
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

Re: building an os with basic

Posted: Wed Sep 16, 2009 8:42 am
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!