Search found 2927 matches

by MrSwiss
Jan 17, 2019 15:04
Forum: Beginners
Topic: DIR does list (some) files as directories
Replies: 14
Views: 396

Re: DIR does list (some) files as directories

A more recent example, can be found in "Beginners": DIR() question
(Assume it to be FBC 64 bit compatible too, older stuff may have problems.)
Forum-Search is your friend ...
by MrSwiss
Jan 15, 2019 22:39
Forum: Tips and Tricks
Topic: Water Effect v0.60
Replies: 11
Views: 781

Re: Water Effect v0.4

When I use -gen gcc then the cmd box will be opened always. May be due to the IDE used ... In FBEdit, this is the case on "quick run", but not for "compile + run", which has different settings: "quick run" = always a console "compile + run" = multiple options...
by MrSwiss
Jan 15, 2019 22:10
Forum: Tips and Tricks
Topic: Water Effect v0.60
Replies: 11
Views: 781

Re: Water Effect v0.4

#Include "windows.bi" and FreeConsole deleted I'd also delete that, for any OS, including WIN. In order to NOT open a console on WIN, simply use compiler switch: fbc -s gui (additional to other compiler switches) I'm not likely to include 1.5 MB "windows.bi", for no compelling r...
by MrSwiss
Jan 13, 2019 23:41
Forum: Tips and Tricks
Topic: CountInString()
Replies: 16
Views: 720

Re: CountInString()

dodicat,

I think it's somewhere in the c-runtime, have you noticed:
#Include "crt.bi" ? Probably, crt/string.bi.
by MrSwiss
Jan 12, 2019 21:19
Forum: Projects
Topic: pcg32rr.bi - minimal PCG32_random_r implementation ( (c) Melissa E. O'Neill )
Replies: 2
Views: 172

Re: pcg32rr.bi - minimal PCG32_random_r implementation ( (c) Melissa E. O'Neill )

Here is the code I've used for the above mentioned tests. IMPORTANT: - only for FBC 64 bit (otherwise, undefined results) you'll have to FIRST uncomment the following two procedures in 'pcg32rr.bi': - pcg32dbl2() and - pcg32dbl3() It's best to comment them after speed test(s) is/are run. Code: /' pc...
by MrSwiss
Jan 12, 2019 20:58
Forum: Projects
Topic: pcg32rr.bi - minimal PCG32_random_r implementation ( (c) Melissa E. O'Neill )
Replies: 2
Views: 172

pcg32rr.bi - minimal PCG32_random_r implementation ( (c) Melissa E. O'Neill )

Hi all, The 32 bit minimal C code from Melissa E. O'Neill translated to FreeBASIC. Only the really necessary procedures added, to deal with issues like: - Initialization (random initial values, Mersenne Twister based, FB's CRT lib.) - Initialization (user supplied initial values), user controlled in...
by MrSwiss
Dec 23, 2018 1:43
Forum: Community Discussion
Topic: Nominations for Forum Moderators
Replies: 70
Views: 4470

Re: Nominations for Forum Moderators

Just to present the other half of the coin: I've said: stay, where you currently are (off the forum), aka: "stay where the pepper grows", which is lightly different, from what our best reknown liar, is trying hard, to imply. The jump into the Lake, was done by himself, without any help by ...
by MrSwiss
Dec 22, 2018 23:50
Forum: Community Discussion
Topic: Nominations for Forum Moderators
Replies: 70
Views: 4470

Re: Nominations for Forum Moderators

deltarho[1859] wrote: As a final note, my returning to the fold will be aided by your being a member of the team. Dodicat, that alone is a good reason to accept ;-) Because I disagree with jj2007: Dodicat, that alone is a acceptable reason, to decline the "job" offer. Apart from that, the...
by MrSwiss
Dec 21, 2018 17:29
Forum: Beginners
Topic: Array pointer assignment
Replies: 26
Views: 760

Re: Array pointer assignment

Another approach, which may illustrate the ptr changing method. Assume that we are doing Circles this time ... 0) define Type as needed 1) generate a (largish) static array of Type (holding all needed info, for Circle statement) 2) generate a alias (Type Ptr) 3) generate a (smallish) dyn. array of a...
by MrSwiss
Dec 20, 2018 17:04
Forum: Tips and Tricks
Topic: Type FixLenStr (fixed size String Type)
Replies: 3
Views: 274

Re: Type FixLenStr (fixed size String Type)

After doing some more tests, I've had to extend code in Let Operator, to let it deal with a uninitialized Type, also ... Since the initial version of SetStr always DeAllocated/Callocated memory, the recoded version only does it, when new size <> old size ... Updated code, in above post, the .bi file...
by MrSwiss
Dec 19, 2018 19:33
Forum: General
Topic: Is screensync not ~60 Hz ?
Replies: 20
Views: 463

Re: Is screensync not ~60 Hz ?

D.J.Peters wrote:Sometimes switching to full screen needs 10 or more seconds here.

You can get around that, by correcting width/height (if on high-res display)
with the opposite scaling factor (e.g. if Win 150%, muliply both by 0.75),
then using "NO_FRAME" instead of "FullScreen" ...
by MrSwiss
Dec 19, 2018 2:59
Forum: General
Topic: Variable String in a UDT question (SOLVED)
Replies: 5
Views: 162

Re: Variable String in a UDT question

Yes, correct. The real string-memory is allocated to the Ptr ...
(len(String) / memory allocated, stored in the two Integers)
by MrSwiss
Dec 19, 2018 2:18
Forum: General
Topic: Variable String in a UDT question (SOLVED)
Replies: 5
Views: 162

Re: Variable String in a UDT question

Generally speaking: a FB var-len String, is a Type (in and of itself), similar to: FixLenStr (using the same layout as FB-String) so, the allocated memory for the effective String is outside of your Type, which only contains the Type's header (1 x Ptr + 2 x Integer). 12 bytes = FBC 32 / 24 bytes = F...
by MrSwiss
Dec 18, 2018 21:01
Forum: Tips and Tricks
Topic: Type FixLenStr (fixed size String Type)
Replies: 3
Views: 274

Re: Type FixLenStr (fixed size String Type)

I recommend overloading at least the Cast/String ... Added: Let & Cast operators ... GetPsz() function (for calling C proc's.) The whole type in a .bi file, "FixLenStr.bi": ' FixLenStr.bi -- 2018-12-20, MrSwiss (operators Cast/Let & GetPsz() added) ' ------------------------------...
by MrSwiss
Dec 17, 2018 14:24
Forum: Beginners
Topic: how to copy files to usb-drive in certain order?
Replies: 9
Views: 254

Re: how to copy files to usb-drive in certain order?

srvaldez,

in that case you'll have to program your own "custom copy" routine, that:
    1) reads all titles (string array)
    2) sorts array (to your preference)
    3) copies (one by one) to the target ...

Go to advanced search