Search found 5536 matches

by counting_pine
Sep 21, 2020 19:34
Forum: Community Discussion
Topic: Compiler code generation?
Replies: 16
Views: 264

Re: Compiler code generation?

fatman2021 wrote:You do realize that C has a perfectly good switch statement you can use? Why don't you use it? What is with all the spaghetti code?
fatman2021, please explain, what is your comment in reference to?
Who is it directed at?
Is it a response to a prior post?
How was the code you gave generated?
by counting_pine
Sep 18, 2020 14:02
Forum: Documentation
Topic: Wiki improvements
Replies: 492
Views: 92763

Re: Wiki improvements

The other problem with over-documentation is that any changes to documented functions will potentially cause breakages for people who have come to rely on those functions. So it imposes more rigidity on the internal structure of the code, or risks breaking trust with developers, or requires them to ...
by counting_pine
Sep 12, 2020 12:33
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 204
Views: 17131

Re: FreeBASIC 1.08 Development

What I find slightly worrying is that Gcc produces a different result. Not in terms of timings but the array looks different... I'd call it a bug unless there is a more convincing explanation. If the code causes undefined behaviour , then different results can both be valid. I believe the results o...
by counting_pine
Sep 06, 2020 21:06
Forum: Documentation
Topic: Basic-Macros in fbc 1.08
Replies: 32
Views: 1136

Re: Basic-Macros in fbc 1.08

Wow, just seen these - looks amazing. They should make for some very powerful macros..
by counting_pine
Aug 30, 2020 11:41
Forum: Documentation
Topic: Wiki improvements
Replies: 492
Views: 92763

Re: Wiki improvements

Of the top of my head: ImageInfo should be dialect agnostic, although the headers it’s likely to see differ for different dialects. Version differences may refer to the byref parameters? They may have once been Integer but changed to Long, or overloaded, or something. I can’t really remember. Rem: t...
by counting_pine
Aug 28, 2020 8:29
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 204
Views: 17131

Re: FreeBASIC 1.08 Development

What if the '-lang fb' lexer precluded the very possibility of suffixes - particularly '$' - by including those symbols within the variable name? e.g. dim a$b$c as integer . Then in order to support legacy functions, it's just a matter of making sure both forms (e.g. mid and mid$ ) are registered a...
by counting_pine
Aug 27, 2020 8:24
Forum: Community Discussion
Topic: FreeBASIC 1.08 Development
Replies: 204
Views: 17131

Re: FreeBASIC 1.08 Development

Under fbc's hood, the lexer expects identifiers to possibly have suffixes so it reads suffixes. But out of the 800+ places in the parser where a decision should be made about suffixes, only about 5 places are handled, often resulting in an error. My personal preference is that '-lang fb' be suffix ...
by counting_pine
Aug 17, 2020 12:00
Forum: Beginners
Topic: #Define vs Const
Replies: 8
Views: 488

Re: #Define vs Const

#define uses simple text replacement, which can have some weird effects because they don't respect operator precedence. const as ubyte bit1 = 1, bit2 = 2, bit3 = 4 const ComboBits = bit1+bit2+bit3 ' = 7 #define ComboBitsDefine bit1+bit2+bit3 print ComboBits*3 ' = 21 print ComboBitsDefine*3 ' = 15? I...
by counting_pine
Aug 04, 2020 14:40
Forum: Beginners
Topic: Stuck writing a simple bit toggle routine
Replies: 19
Views: 691

Re: Stuck writing a simple bit toggle routine

I would probably recommend just doing :

Code: Select all

.status xor= (1 shl _hidden)
by counting_pine
Aug 01, 2020 8:20
Forum: Community Discussion
Topic: Found another compiler bug: "operand type mismatch for `call'"
Replies: 11
Views: 455

Re: Found another compiler bug: "operand type mismatch for `call'"

Well, the immediate backend is now generally GCC, which produces the bad asm.. It might be worth saying, a relatively unobtrusive workaround that allows you to keep the SS name is to #define SS as something else. If you have more of them, you can stash them away in an #include somewhere. Just bear i...
by counting_pine
Jul 31, 2020 20:21
Forum: Community Discussion
Topic: Found another compiler bug: "operand type mismatch for `call'"
Replies: 11
Views: 455

Re: Found another compiler bug: "operand type mismatch for `call'"

I'm not an expert, but it seems to be a pretty fundamental problem in the masm intel syntax. It's easily shown with a simple program in GCC: // compile with gcc -masm intel int ss(){ } /tmp/ccOC4unv.s: Assembler messages: /tmp/ccOC4unv.s: Error: .size expression for ss does not evaluate to a constan...
by counting_pine
Jul 31, 2020 15:05
Forum: Documentation
Topic: Wiki improvements
Replies: 492
Views: 92763

Re: Wiki improvements

Sorry, I was trying something with the .htaccess. Logins should work again now.
by counting_pine
Jul 28, 2020 16:55
Forum: Community Discussion
Topic: Forum search has stopped working.
Replies: 15
Views: 1167

Re: Forum search has stopped working.

I occasionally search for (recent) mentions of FPC and Lazarus to comment on. I just did, and I only get results from 2005. Seems the search is working, but just got its database restored to the very beginnings ;-) Ah, I started a rebuild, but apparently if I close the page the rebuild stops. Perha...
by counting_pine
Jul 26, 2020 15:28
Forum: Community Discussion
Topic: Forum search has stopped working.
Replies: 15
Views: 1167

Re: Forum search has stopped working.

Bit of a kludge, but you can enable highlighting on a forum page with the hilit= URL parameter.

e.g. viewtopic.php?f=17&t=28726&hilit=search
by counting_pine
Jul 26, 2020 13:44
Forum: Community Discussion
Topic: Forum search has stopped working.
Replies: 15
Views: 1167

Re: Forum search has stopped working.

I'll try recreating the search index. See if that fixes it.
Otherwise, I guess you're probably stuck with your usual search engine of choice..

Go to advanced search