Search found 1472 matches

by caseih
Sep 21, 2020 23:32
Forum: Community Discussion
Topic: Compiler code generation?
Replies: 16
Views: 372

Re: Compiler code generation?

fatman2021, please explain, what is your comment in reference to? Poor code generation. Why do you think that? What evidence do you have that this is poor? Hint. A lot of C code generators generate code like this because it's flexible and fast. Remember switch() is just syntactic sugar for the exac...
by caseih
Sep 21, 2020 19:34
Forum: Community Discussion
Topic: Compiler code generation?
Replies: 16
Views: 372

Re: Compiler code generation?

That is machine-generated code. While a switch statement would look cleaner, it's not necessarily faster and would just make the emitter more complicated. It all compiles down to the same machine code.
by caseih
Sep 19, 2020 3:48
Forum: General
Topic: Object oriented programming or 3d graphics?
Replies: 21
Views: 647

Re: Object oriented programming or 3d graphics?

cwolf wrote:Very funny.

Excuse me? What part of this very extensive book do you find funny? From what I can see it covers very thoroughly every aspect of learning OpenGL. Granted the code is in C, but the principles and concepts will serve you well in FB.
by caseih
Sep 02, 2020 4:05
Forum: Community Discussion
Topic: Executable size 11x larger than C's?
Replies: 8
Views: 544

Re: Executable size 11x larger than C's?

Like jj2007 says, the difference in size is the size of the FB runtime library which is statically-linked into your binary. The linker will remove uncalled routines from it, but string library takes up some space, as do the routines for setting up the FB runtime. Your C binary is only dynamically-li...
by caseih
Aug 27, 2020 18:45
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 206
Views: 17392

Re: FreeBASIC 1.08 Development

I also hear a lot of people saying that you shouldn't need more than 1MB, and I don't believe them either. Glad to hear that! Even then not all symbols used in the function are declared in the function, so this is an irrelevant argument. I disagree. Although I have forgotten what the argument was a...
by caseih
Aug 27, 2020 2:23
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 206
Views: 17392

Re: FreeBASIC 1.08 Development

Hungarian notation is a sign of (1) a defective, too weak typed language (2) and unproductive IDE. Hovering above a variable can simply show declaration/type. Well I've heard people argue that a language that requires an IDE to be productive is not necessarily a good thing. And there are arguments ...
by caseih
Aug 27, 2020 2:20
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 206
Views: 17392

Re: FreeBASIC 1.08 Development

Hungarian notation is a sign of (1) a defective, too weak typed language (2) and unproductive IDE. Hovering above a variable can simply show declaration/type. Well I've heard people argue that a language that requires an IDE to be productive is not necessarily a good thing. And there are arguments ...
by caseih
Aug 23, 2020 15:06
Forum: DOS
Topic: FreeDOS 21st century?
Replies: 30
Views: 13934

Re: FreeDOS 21st century?

I think @angros47 means that a linux kernel (which is already light-weight) running multiple dosemu instances will accomplish right now, in a way that supports a range of hardware, multi-tasking 16-bit real-mode dos programs. Many years ago I had a friend running OS/2 2.1, but instead of the heavy g...
by caseih
Aug 23, 2020 3:15
Forum: DOS
Topic: FreeDOS 21st century?
Replies: 30
Views: 13934

Re: FreeDOS 21st century?

Sure, but it would be fun!
by caseih
Aug 16, 2020 1:07
Forum: Beginners
Topic: changing code pages
Replies: 28
Views: 1017

Re: changing code pages

Works fine here. What is the encoding of your .bas file? String literals must be either utf-8 or utf-16 if I recall correctly Which FB version? 1.07? For me, it probably stopped working when I updated from 1.05 to 1.07. Either version. If the file is encoded properly with the BOM header, it FB will...
by caseih
Aug 16, 2020 0:59
Forum: Beginners
Topic: changing code pages
Replies: 28
Views: 1017

Re: changing code pages

My result Print: Добро пожаловать Printf: ????? ?????????? W r i t e F i l e : >1@> ?> W r i t e C o n s o l e : >1@> ? Yeah printf does not understand wide strings. When FB sees a unicode string literal, it makes it a WSTRING internally, which is why printf shows garbage. You're seei...
by caseih
Aug 15, 2020 23:17
Forum: Beginners
Topic: changing code pages
Replies: 28
Views: 1017

Re: changing code pages

Anyway, it's a can of worms. Print "This is Russian: Добро пожаловать" used to work fine, now it doesn't, and I don't have the faintest idea why it stopped working. Works fine here. What is the encoding of your .bas file? String literals must be either utf-8 or utf-16 if I recall correctl...
by caseih
Aug 07, 2020 14:25
Forum: General
Topic: How can I use fbgfx in C?
Replies: 6
Views: 489

Re: How can I use fbgfx in C?

What operating system? If you're using the GCC backend in FB, you can create a test program and use the compiler flag "-r" to emit a C file that you can look at. For example, here's a simple C program I created based on the the compiler output from a simple FB example program: typedef sign...
by caseih
Jul 05, 2020 3:18
Forum: Tips and Tricks
Topic: Yet another expression parser (spreadsheet)
Replies: 16
Views: 911

Re: Yet another expression parser (spreadsheet)

No compile warnings or errors on my machine, FB 1.07, Linux, 64-bit. Underlying GCC is version 10.1.1.
by caseih
Jul 01, 2020 23:52
Forum: General
Topic: Embedding a Spreadsheet
Replies: 35
Views: 2003

Re: Embedding a Spreadsheet

I don't think it's worth it to support variadic operators in RPN. My trusty HP 48 certainly doesn't bother with it. If you want algebraic expression parsing, many years ago (like nearly 30 years ago) I wrote a recursive-descent parser to parse expressions (one character lookahead I think), roughly b...

Go to advanced search