Search found 3040 matches

by MrSwiss
Mar 26, 2019 1:51
Forum: Community Discussion
Topic: variadic functions and argument lists in fbc
Replies: 22
Views: 1284

Re: variadic functions and argument lists in fbc

Took the example from Documentation, and run it OK (see comments in code): ' ' tested with St_W's build: DEV x64 WIN standalone --> OK! ' whole crt dir, with all files, copied from FBC 1.06.0 x64 WIN ' '' pass the args list to a function taking an cva_list type argument #include "crt/stdio.bi&q...
by MrSwiss
Mar 23, 2019 2:12
Forum: Documentation
Topic: topic proposal: differences/changes when you move to multithread
Replies: 34
Views: 2082

Re: topic proposal: differences/changes when you move to multithread

Why not use a namespace to hold variables and various functions. I like the idea of a namespace, keeps things nicely separated. I've slightly modified your code (removing the include) and, moving threading into start() a Function now, to return: Error/OK state. Namespace g Dim As Long MySpeed=400 D...
by MrSwiss
Mar 22, 2019 19:44
Forum: Documentation
Topic: topic proposal: differences/changes when you move to multithread
Replies: 34
Views: 2082

Re: topic proposal: differences/changes when you move to multithread

<sarcasm on> My Dad used to say: "Why do it simple, if it can also be done, in a much more complex way?". <sarcasm off> Meaning: a Static variable inside a Type = shared (see: Documentation) (the Type itself, is therefore nothing but camouflage, for "shared") This by extension me...
by MrSwiss
Mar 22, 2019 19:10
Forum: Documentation
Topic: topic proposal: differences/changes when you move to multithread
Replies: 34
Views: 2082

Re: topic proposal: differences/changes when you move to multithread

You still don't make sense, because there is only a single instance of Type needed ...
by MrSwiss
Mar 22, 2019 18:59
Forum: Documentation
Topic: topic proposal: differences/changes when you move to multithread
Replies: 34
Views: 2082

Re: topic proposal: differences/changes when you move to multithread

You don't seem to understand:
there is absolutely NO reason, to declare the mutex 'Static' in the Type ...
(therefore, your additional line is sort of: redundant, anyway)
by MrSwiss
Mar 22, 2019 18:09
Forum: Documentation
Topic: topic proposal: differences/changes when you move to multithread
Replies: 34
Views: 2082

Re: topic proposal: differences/changes when you move to multithread

Type thread_common_data Static As Any Ptr MLock ' declare the common MUTEX (to all threads!) As Any Ptr TI ' pointer to the specific Type instance for the thread End Type I don't get the reason, for the ' Static ' specifier in the Type, as well, as it throws an error: C:\DEV_TOOLS\FreeBASIC\1060_64...
by MrSwiss
Mar 22, 2019 13:57
Forum: Documentation
Topic: topic proposal: differences/changes when you move to multithread
Replies: 34
Views: 2082

Re: topic proposal: differences/changes when you move to multithread

... it as a static data field of a common Type which ... What makes you assume, that the Type is common, too? My assumption was, that the Type is custom to each thread (depending on it's job). (two Time-threads hardly make a lot of sense) This then, needs a Mutex implementation, as given (shared An...
by MrSwiss
Mar 21, 2019 17:10
Forum: Documentation
Topic: topic proposal: differences/changes when you move to multithread
Replies: 34
Views: 2082

Re: topic proposal: differences/changes when you move to multithread

Yes, but as soon as we have to manage with competition problems between the different threads, from the simple exclusion control (by mutex) ... Another issue with threads is: how to ' communicate ' with a thread, without a bunch of globals. A Type comes to mind almost instantly, but we only have a ...
by MrSwiss
Mar 18, 2019 21:21
Forum: Beginners
Topic: Compiling the runtime library
Replies: 16
Views: 1262

Re: Compiling the runtime library

IIRC, MSYS2 created problems on St_W's Jenkins build server, which where gone,
after switching back, to MSYS ... (can't remember the exact reason).
by MrSwiss
Mar 17, 2019 22:32
Forum: Beginners
Topic: Compiling the runtime library
Replies: 16
Views: 1262

Re: Compiling the runtime library

There might be a issue similar to: exported proc (aka: public) and, internal proc (aka: private).

I agree, that this may be related, to a missing compiler switch (exclude private's).
Do you use a utility (make, msys, msys2) or, just command line?
by MrSwiss
Mar 17, 2019 21:13
Forum: Beginners
Topic: Compiling the runtime library
Replies: 16
Views: 1262

Re: Compiling the runtime library

... the library format shouldn´t change between versions - or am i wrong here? AFAIK, since fixes and/or imrovements may necessitate changes to internal lib's too, it is a 'wise ' choice, to use one (and the same) compiler version, for a complete FBC build ... (incl. fbCRT, fbGFX2). (GCC versions m...
by MrSwiss
Mar 17, 2019 20:51
Forum: Beginners
Topic: Compiling the runtime library
Replies: 16
Views: 1262

Re: Compiling the runtime library

Is the version of GCC the same, as the one used, to 'make' respective FBC?
(check: release notes, of the FBC version)
by MrSwiss
Mar 17, 2019 20:22
Forum: Windows
Topic: Print2Pdf , cmd line tool to convert files to pdf
Replies: 3
Views: 324

Re: Print2Pdf , cmd line tool to convert files to pdf

From my point of view, there is something important missing, if the aim is, to: replace tool(s) like PDFCreator, which is "generation of unique file-name(s)", aka: "file-name" + "save-date" + "save-time" + ".PDF" , or similar ... This is under the fo...
by MrSwiss
Mar 15, 2019 18:13
Forum: General
Topic: Squares
Replies: 6608
Views: 374388

Re: Squares

@albert,

seems, you are looking for a BCD encoder (binary coded decimal).
You may want to look at: Union as 'own' data-type which is only at byte level currently,
but can be extended by yourself, if needed/wanted ...
by MrSwiss
Mar 14, 2019 13:13
Forum: General
Topic: Substitute text into a string
Replies: 4
Views: 374

Re: Substitute text into a string

AFAIK, compiling with -pp tells the preprocessor to expand the #Define (#Macro)
into a string, which whould then be printable ... (no direct method I know of).

Go to advanced search