Search found 5510 matches

by counting_pine
Apr 06, 2019 23:05
Forum: General
Topic: fbGFX: BUG in Paint statement
Replies: 46
Views: 3497

Re: fbGFX: BUG in Paint statement

Isn't a bug something, which should draw "topmost attention"? (aka: has top priority) I'm aware that this is, to a certain extent, depending on who reports it, because many don't check their code, for syntactical correctness, etc. causing ' false positives '. (not enough research, before ...
by counting_pine
Apr 06, 2019 21:06
Forum: General
Topic: fbGFX: BUG in Paint statement
Replies: 46
Views: 3497

Re: fbGFX: BUG in Paint statement

I'd agree with you that capitalisation is sensible and correct to use if you're using an acronym, keyword, constant, etc. that is supposed to be capitalised. But unnecessary emphasis can alter the tone of a post, particularly when its purpose is to draw attention to a fault. Regarding the example co...
by counting_pine
Apr 06, 2019 16:22
Forum: General
Topic: fbGFX: BUG in Paint statement
Replies: 46
Views: 3497

Re: fbGFX: BUG in Paint statement

Thanks for the report. I'd prefer though if you didn't capitalise the word "bug". It just comes across as shouting. Your example code has a subtle problem: the red border changes colour if it's partially transparent, so isn't actually equal to the border colour. But if I fix that - using t...
by counting_pine
Apr 05, 2019 18:56
Forum: Documentation
Topic: Where is printexpressionlist defined?
Replies: 7
Views: 5559

Re: Where is printexpressionlist defined?

Yeah, in most cases, I expect people will not want to mix formatted and unformatted output in a single Print expression, but the possibility is there if anyone wants to do that. In practice, maybe it's not a feature worth having, since makes the documentation a little more complex, and possibly mean...
by counting_pine
Apr 04, 2019 15:16
Forum: General
Topic: Need help on converting C code
Replies: 12
Views: 1328

Re: Conclusion : Need help on converting C code

You have dkl from the FB development team to thank for fbfrog. *str++ = *dest++ better like that ( str=dest ; dest+=1; str+=1;) Don't forget to dereference: '*str = *dst' A couple more thoughts occur to me: - (a,b) can be translated to FB (if you really have to!) as 'iif(a,b,b)', as long as 'a' retu...
by counting_pine
Apr 03, 2019 12:40
Forum: General
Topic: Need help on converting C code
Replies: 12
Views: 1328

Re: Need help on converting C code

I had another go at translating. Here is the code with indentation: if (! ( ( bits= bits&0x7fffffff? ( resbits=bits, bits+bits ) : ( src+=4, resbits=*((Ulong *)(src-4)), (resbits<<1)+1 ) ), resbits>>31 ) ) { goto uselastofs; } That means it can be translated to something like: if (bits & 0x7...
by counting_pine
Apr 02, 2019 13:13
Forum: General
Topic: Need help on converting C code
Replies: 12
Views: 1328

Re: Need help on converting C code

What horrible code! Unfortunately it won't translate directly to a single FB expression. Maybe the first thing to do would be to translate it several separate lines of C, which can then be ported.. - (b=c) is an expression that assigns c to b, then returns b. - (a,b) evaluates a, then evaluates b, t...
by counting_pine
Mar 29, 2019 14:39
Forum: Windows
Topic: PALETTE USING and SCREEN bug on newer windows OS
Replies: 7
Views: 5933

Re: PALETTE USING and SCREEN bug on newer windows OS

Interesting... I could be wrong about this, but I seem to recall FB does its own palette rendering, and just uses RGB mode on the final Windows screen.. Either way, Screen and Screenres should behave the same way in most respects. There are no deep architectural differences. Can you provide code tha...
by counting_pine
Mar 25, 2019 14:49
Forum: Windows
Topic: Windows 10 Window Close
Replies: 12
Views: 5447

Re: Windows 10 Window Close

Hmm, lang qb doesn't allow me to declare SetConsoleCtrlHandler() properly (it requires ' __extern "Windows" ', which apparently isn't allowed). Therefore, lang qb code will probably have to use a second file for the error handler. '' handler.bas #lang "fb" '' override '-lang qb' ...
by counting_pine
Mar 25, 2019 14:23
Forum: Community Discussion
Topic: Where can I get a Recent-Git-Build of FreeBASIC?
Replies: 438
Views: 72605

Re: Where can I get a Recent-Git-Build of FreeBASIC?

Git builds probably shouldn't just have the next version number. It would be better for them to be versioned by commit id, or possibly feature tthe build date prominently.
by counting_pine
Mar 24, 2019 17:20
Forum: Windows
Topic: Windows 10 Window Close
Replies: 12
Views: 5447

Re: Windows 10 Window Close

Actually, looking at https://stackoverflow.com/questions/28596235/graceful-exit-when-closing-console-window, you can do processing/cleanup in the error handler, but when the program closes when the handler finishes, so FB's handler that sends keys to the Inkey buffer would be ineffectual. Anyway, I'...
by counting_pine
Mar 24, 2019 17:02
Forum: Windows
Topic: Windows 10 Window Close
Replies: 12
Views: 5447

Re: Windows 10 Window Close

Hmm, I guess Microsoft may have changed their policy on terminating console programs over different versions over the years.. Searching the wider Internet finds questions like https://stackoverflow.com/questions/28596235/graceful-exit-when-closing-console-window, which generally seem to suggest usin...
by counting_pine
Mar 23, 2019 17:27
Forum: Windows
Topic: Windows 10 Window Close
Replies: 12
Views: 5447

Re: Windows 10 Window Close

k6sti wrote:I tried adding SCREEN 0. It did not help.

Oh, I forgot to mention - Screen 0 exits the graphics screen (if any) and uses the console, so it doesn't actually count as a Screen mode.
by counting_pine
Mar 23, 2019 16:52
Forum: Windows
Topic: Windows 10 Window Close
Replies: 12
Views: 5447

Re: Windows 10 Window Close

OK.. Can you post some example code, as fxm suggests? That would help us all to be on the same page.
For me on Windows 7, the console 'X' button actually just closes the program immediately. I'm not even sure if it has a chance to register the button is clicked.
by counting_pine
Mar 23, 2019 15:34
Forum: Windows
Topic: Windows 10 Window Close
Replies: 12
Views: 5447

Re: Windows 10 Window Close

Could it be that you're checking for Chr$(255)+"k" instead of Chr$(0)+"k"? QB has historically used 0, but FB switched to 255, due to quirks with the Null character. This code should work: '$lang: "qb" screen 13 print "Press the X to close" do sleep loop until...

Go to advanced search