Search found 3863 matches

by MrSwiss
Sep 08, 2021 14:05
Forum: Community Discussion
Topic: FreeBASIC 1.09.0 Release
Replies: 256
Views: 52511

Re: FreeBASIC 1.08.1 and 1.09.0 Development

dodicat, 32 bit seems to be the same either optimised or not (32 fps) Note that optimising with the official 32 bit compiler gives (32 fps and 38 fps) There is a difference between 'official' and 'nightly' builds. The latest 'official' builds in 32/64 bits, come complete with GCC in the package (sin...
by MrSwiss
Sep 07, 2021 22:11
Forum: Community Discussion
Topic: FreeBASIC 1.09.0 Release
Replies: 256
Views: 52511

Re: FreeBASIC 1.08.1 and 1.09.0 Development

Above __FB_BUILD_DATE__ and __FB_BUILD_DATE_ISO__ is correct. Below is not correct: Code: Select all #Print __FB_BUILD_DATE_ISO___ ' NOT resolved yet '#Print __FB_BUILD_DATE___ I don't want to give away the surprise ... look closely. :P Yea, you're correct. As always, the details (one underline too...
by MrSwiss
Sep 07, 2021 20:36
Forum: Community Discussion
Topic: FreeBASIC 1.09.0 Release
Replies: 256
Views: 52511

Re: FreeBASIC 1.08.1 and 1.09.0 Development

dodicat,
dodicat wrote:-gen gcc -O 2 looks strange.
It nevertheless works in both: FBEdit aswell as command line.
In FBEdit -O2 never worked propperly (w/o a space inbetween) ...
by MrSwiss
Sep 07, 2021 16:09
Forum: Community Discussion
Topic: FreeBASIC 1.09.0 Release
Replies: 256
Views: 52511

Re: FreeBASIC 1.08.1 and 1.09.0 Development

#cmdline "args..." directive added to specify fbc command line options in user source. @coderJeff, great job. I've had to test it straight away (with StW's latest 'nightly build') however, it doesn't seem to work 'as intended': ' _test.bas -- (c) 2021-09-07, MrSwiss #If __FB_VERSION__ >= ...
by MrSwiss
Sep 01, 2021 20:55
Forum: Sources, Examples, Tips and Tricks
Topic: rangemacs.bi (ranging macros fixed)
Replies: 7
Views: 1440

Re: rangemacs.bi (ranging macros fixed)

dodicat wrote:It still doesn't get a small range right at the top of ulongint.
Seriously ???
I don't see a viable 'use-case' for such a small range (of ULongInt).

For your requirement, the ULong range macro does the trick:

Code: Select all

...
    Print u64max - u32rng(0, 3)
...
by MrSwiss
Sep 01, 2021 19:16
Forum: Beginners
Topic: [solved] Is it normal that OPEN COM is delayed when FTDI is connected ?
Replies: 7
Views: 870

Re: Is it normal that OPEN COM is delayed when FTDI is connected ?

Daniel Ouellette wrote:So there is nothing we can do about it, is that right ?
In short: yes, correct.

Advice: always connect devices first (perhaps before booting even), then start program.
by MrSwiss
Sep 01, 2021 15:03
Forum: Sources, Examples, Tips and Tricks
Topic: rangemacs.bi (ranging macros fixed)
Replies: 7
Views: 1440

Re: rangemacs.bi (ranging macros fixed)

Maybe you could provide a main code example for a range at the top of ulongint. No problem at all. It even uses one of the Const's. ;-) rangemacs_test.bas: ' rangemacs_test.bas -- (c) 2021-09-01, MrSwiss #Include "rangemacs.bi" ' helpers: ranging macro's & const's Randomize( , 5) ' ==...
by MrSwiss
Sep 01, 2021 12:59
Forum: Sources, Examples, Tips and Tricks
Topic: rangemacs.bi (ranging macros fixed)
Replies: 7
Views: 1440

Re: rangemacs.bi (ranging macros fixed)

Am I missing something MrSwiss? You don't use the constants. Correct, but they are just 'helpers' for 'main' code (this is only a include-file, after all). You cannot really escape the fact that rnd returns a double. What am I missing with your method? I'm actually forcing Double processing, in the...
by MrSwiss
Aug 31, 2021 15:22
Forum: Sources, Examples, Tips and Tricks
Topic: rangemacs.bi (ranging macros fixed)
Replies: 7
Views: 1440

rangemacs.bi (ranging macros fixed)

I've by chance stumbled over an issue with commonly used RANGE macros. Cost me some hours searching, to figure the issue out, which is related to datatype 'overflow'. It is one of those nasty 'edge cases' who only very seldom 'crop up'. Typical ULong ranger: #Define u32rng(l, h) CULng(Int(Rnd * ((h)...
by MrSwiss
Aug 31, 2021 0:59
Forum: Beginners
Topic: [solved] Is it normal that OPEN COM is delayed when FTDI is connected ?
Replies: 7
Views: 870

Re: Is it normal that OPEN COM is delayed when FTDI is connected ?

Basically, if the device is already connected, before program start, it's almost instant.

It's however different, if the device is plugged in, after program start ...
by MrSwiss
Aug 30, 2021 21:06
Forum: Beginners
Topic: [solved] Is it normal that OPEN COM is delayed when FTDI is connected ?
Replies: 7
Views: 870

Re: Is it normal that OPEN COM is delayed when FTDI is connected ?

Daniel Ouellette wrote:..., but is it normal that it remains blocked in OPEN CON during this time ?
AFAIK: yes, because the OS first ENUMERATES the USB-device, before it releases it, for Application-Communication (enumeration seems always to be slow).
by MrSwiss
Aug 30, 2021 17:25
Forum: Documentation
Topic: VAR as a topic
Replies: 16
Views: 3914

Re: VAR as a topic

No one ever said, that this is for Beginners (a weak argument anyhow). VAR can easily be forced to be of a wanted datatype (by those that know "the basics of datatypes"). There are in fact three prerequisites to success: 1) knowledge of all Standard Datatypes (of FreeBASIC) 2) coercion &am...
by MrSwiss
Aug 25, 2021 0:18
Forum: Windows
Topic: Lutz Ifers WinAPI Tutorial
Replies: 10
Views: 2773

Re: Lutz Ifers WinAPI Tutorial

Windows internal data-types: wrote: UINT
An unsigned INT. The range is 0 through 4294967295 decimal.
This type is declared in WinDef.h as follows:
typedef unsigned int UINT;
Equivalents of UINT are:
(Windows) UINT32, DWORD (and, probably more ...)
(FreeBASIC) ULong, UInteger<32> (without size specifier it's simply wrong)
by MrSwiss
Aug 20, 2021 14:59
Forum: Beginners
Topic: Questions about DLL
Replies: 3
Views: 694

Re: Questions about DLL

I'm assuming you're on Windows. 1) don't use the U/Integer data-type to interface with C/C++ (WIN-API) use U/Long instead. ( U/Integer is always ptr-size, not fixed-size, which is expected) 2) 32-bit Color is always ULong (consists of 4 x UByte). 3) use Extern "windows-ms" in DLL-code (32-...
by MrSwiss
Aug 20, 2021 2:02
Forum: Community Discussion
Topic: FreeBASIC 1.09.0 Release
Replies: 256
Views: 52511

Re: FreeBASIC 1.08.1 and 1.09.0 Development

@coderJeff, thanks for the answer. More involved resolution than first assumed by myself. ... What's the bug? What IDE? FBIDE, the bug is well known, no "upper case" command line options accepted (all converted to "lower case" I think). Example: fbc -gen gcc -O n someprog.bas (ca...