Search found 1608 matches

by badidea
Dec 12, 2019 0:07
Forum: Beginners
Topic: Type Mismatch
Replies: 18
Views: 481

Re: Type Mismatch

storm5510 wrote:

Code: Select all

result = mod(a, b)

A bit nasty:

Code: Select all

result = a mod b

Mod is a reserved keyword, but it can be "overloaded". (see, e.g: ProPgOperatorOverloading)
by badidea
Dec 11, 2019 22:31
Forum: Community Discussion
Topic: Suddenly FB executables are detected as Trojans or the philosophy about using Window / Linux ;-)
Replies: 40
Views: 1030

Re: Suddenly FB executables are detected as Trojans

Using the start menu requires mouse after XP, and taking your hands of the keyboard. I think that the whole 'start menu' is obsolete. I just press the windows/super-key and start typing a part of application name and press enter. On window and linux. On Windows 10 there is now so much crap in the m...
by badidea
Dec 09, 2019 23:36
Forum: Beginners
Topic: Type Mismatch
Replies: 18
Views: 481

Re: Type Mismatch

I don't know this library, but maybe:

Code: Select all

result = big_int_divmod(@a, @b, @c)
by badidea
Dec 09, 2019 22:53
Forum: Community Discussion
Topic: Suddenly FB executables are detected as Trojans or the philosophy about using Window / Linux ;-)
Replies: 40
Views: 1030

Re: Suddenly FB executables are detected as Trojans

Don't complain, the future will be worse: "In 10 to 20 years from now, operating systems disable local data storage. All data will be stored in the cloud only and will be continuously checked by advanced AI for malware and deleted if judged so. Writing code will only be allowed with a license i...
by badidea
Dec 09, 2019 12:09
Forum: Community Discussion
Topic: Suddenly FB executables are detected as Trojans or the philosophy about using Window / Linux ;-)
Replies: 40
Views: 1030

Re: Suddenly FB executables are detected as Trojans

[troll]

dodicat wrote:I am not the boss of my own computer anymore, I have been overthrown!
UEZ wrote:Where should this lead, if per se all programming languages are blacklisted now, because they can be a potential threat?
GNU/Linux?

[/troll]
by badidea
Dec 08, 2019 16:15
Forum: General
Topic: Duplicate Definition
Replies: 4
Views: 181

Re: Duplicate Definition

So logic dictates that it knows the location of both instances of the repeated declaration. I don't think that the compiler works that way. Probably it goes through all the files included without memory of what was defined where. I only says: "Hey, I have seen this before". To locate the ...
by badidea
Dec 07, 2019 19:09
Forum: General
Topic: Preprocessor question
Replies: 17
Views: 427

Re: Preprocessor question

Ah, compile with -pp. I learned something new again.
by badidea
Dec 07, 2019 17:45
Forum: General
Topic: Preprocessor question
Replies: 17
Views: 427

Re: Preprocessor question

I expect that "\" or "/" is a special character for the pre-compiler.
by badidea
Dec 06, 2019 21:37
Forum: General
Topic: Preprocessor question
Replies: 17
Views: 427

Re: Preprocessor question

You could simply define your path as the folder without the end quote. and put the end quote at the end of #include. That indeed works and is the most simply solution. The only problem is that it looks ugly. Especially because met editor highlighter gets confused. Paul doe's version works as well, ...
by badidea
Dec 06, 2019 19:29
Forum: General
Topic: Checking if an array is empty.
Replies: 5
Views: 163

Re: Checking if an array is empty.

mrToad wrote:I don't get any runtime error:
...

With fbc -exx you most likely will.
by badidea
Dec 06, 2019 13:54
Forum: General
Topic: Preprocessor question
Replies: 17
Views: 427

Re: Preprocessor question

To clarify, this is how (the top of) my code looks now: #include once "../_code_lib_new_/graphics_v02.bi" #include once "../_code_lib_new_/keyboard_v01.bi" #include once "../_code_lib_new_/image_v02.bi" #include once "../_code_lib_new_/image_buffer_v01.bi" #in...
by badidea
Dec 05, 2019 23:48
Forum: General
Topic: Preprocessor question
Replies: 17
Views: 427

Preprocessor question

Is this possible in some way? #define INC_LIB "../_code_lib_new_/" 'const INC_LIB = "../_code_lib_new_/" '#include once "$(INC_LIB)graphics_v02.bi" #include once INC_LIB ## "graphics_v02.bi" Goal: I would like to specify where my .bi files are located via a de...
by badidea
Dec 03, 2019 23:23
Forum: General
Topic: (Solved) How to sort datasheet (x-dim array) by a few columns (at once in 1 loop) ?
Replies: 24
Views: 838

Re: How to sort datasheet (x-dim array) by a few columns (at once in 1 loop) ?

I switched back to my 'class' version, with some changes. One can define the number of additional columns with const NUM_OTHER_COLS = 1 The added columns are all (dynamic) strings. I ran a test with 1 and with 50 other columns. The difference in sorting time seems not worth the trouble 'sorting poin...
by badidea
Dec 03, 2019 19:56
Forum: General
Topic: c qsort compare callback as member function?
Replies: 14
Views: 423

Re: c qsort compare callback as member function?

I should have marked this topic as solved. Now I have to try to understand all this twisted hacking and macro magic.
BTW: yes I run linux, but I prefer to have the code working on both linux and windows.
by badidea
Dec 03, 2019 9:40
Forum: General
Topic: (Solved) How to sort datasheet (x-dim array) by a few columns (at once in 1 loop) ?
Replies: 24
Views: 838

Re: How to sort datasheet (x-dim array) by a few columns (at once in 1 loop) ?

As I dont know/use qsort library function, I have question to sort cycles. For me, is it also the first time I use qsort (in freebasic). IIUC, qsort/resp. your 'sort()' procedure will sort WHOLE array, right ? Yes, in my example bla1 and bla2 are moved as well. That mean, say, if array has 50 cols ...

Go to advanced search