Search found 1219 matches

by St_W
Feb 02, 2018 1:16
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 199
Views: 7287

Re: Pure FB Runtime Library (in progress)

So, there is a file called cpudetect.s It is assembly passed to GCC. Could this be passed directly to GAS or even converted into a bas file using asm...end asm blocks? I tried to find info about what syntax the .s files use, but I could not find anything concrete from a quick google search. Just cr...
by St_W
Jan 31, 2018 19:46
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 199
Views: 7287

Re: Pure FB Runtime Library (in progress)

Imortis wrote:Ah! So it would be better to replace it with this:

Code: Select all

dst -= 1
*dst = blah blah blah

Yes.

btw there are nice webservices to test all kinds of code, even including C/C++ or FreeBasic. For the discussed code e.g. try this: https://repl.it/repls/WorriedFrenchAurochs
by St_W
Jan 31, 2018 19:30
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 199
Views: 7287

Re: Pure FB Runtime Library (in progress)

Imortis wrote:dst is a ptr. Is it decrementing the pointer or the value? I thought it was the ptr.

The pointer ist decremented first, then the (decremented) pointer is dereferenced.

dst[-1] does not update the pointer.
by St_W
Jan 31, 2018 18:26
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 199
Views: 7287

Re: Pure FB Runtime Library (in progress)

Imortis wrote:Also, as a sanity check:

Code: Select all

*--dst

in c is equivilant to

Code: Select all

dst[-1]

in FB right?

It also decrements dst.
by St_W
Jan 21, 2018 17:20
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 199
Views: 7287

Re: Pure FB Runtime Library (in progress)

Building the compiler twice before testing has been necessary and is done also for fbc with non-FB runtime library (e.g. think of the introduction of the boolean datatype a few years ago). The new thing is just that - in addition to fbc - also the runtime library itself will need to be recompiled, w...
by St_W
Jan 21, 2018 17:10
Forum: General
Topic: cpp ref call
Replies: 8
Views: 257

Re: cpp ref call

C to take is unfortunately not the solution. and at the moment, that's it too time consuming for me to create a wrapper. I was just talking of "plain C interfaces", your code can still be C++, you just need a (wrapper) library that exports C functions for the functionality you want to acc...
by St_W
Jan 21, 2018 12:50
Forum: General
Topic: cpp ref call
Replies: 8
Views: 257

Re: cpp ref call

As C++ does not define a standardized ABI and different compilers and compiler versions are often incompatible to each other I would suggest to not use C++ interfaces for anything else than C++ code compiled with the same compiler. For interfacing with other programming languages or compilers (like ...
by St_W
Jan 19, 2018 17:07
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 199
Views: 7287

Re: Pure FB Runtime Library (in progress)

IIRC you can redefine types/symbols in C as long as you use the same definition and the compiler won't complain.
by St_W
Jan 17, 2018 21:22
Forum: General
Topic: Simple Expressions showing "-1.#IND" results?
Replies: 11
Views: 308

Re: Simple Expressions showing "-1.#IND" results?

These two are invalid calculations: Print "#7: (-3.0)^ 2.5 ="; (-3.0)^ 2.5 Print "#8: (-3.5)^ 2.5 ="; (-3.5)^ 2.5 [...] They are both VERY similar to the previous expressions! My calculator gives a result to #7 as -15.59, and to #8 as -22.92. (-3.0) ^ 2.5 is equivalent to (-3.0)...
by St_W
Jan 17, 2018 21:03
Forum: General
Topic: Benefits of inline if?
Replies: 31
Views: 749

Re: Benefits of inline if?

I tried a simple function to simulate iif. [...] You are using only constant expressions for IIF, so you won't notice a difference to the real IIF. But as soon as you use non-constant expressions you'll notice the difference and see that the behavior cannot be implemented as a function. For example...
by St_W
Jan 17, 2018 20:51
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 199
Views: 7287

Re: Pure FB Runtime Library (in progress)

I'm not completely sure, but doesn't fbc handle ASC calls with constant values during compile time instead of calling the ASC function at runtime?
by St_W
Jan 17, 2018 20:48
Forum: General
Topic: Graphical programs pausing at start [Very strange]
Replies: 20
Views: 597

Re: Very strange

Maybe some security software like virus scanners or ransomware protection tools (e.g. recent Acronis Backup solutions) causes that delay. Try to uninstall them and remove them completely (often there are separate removal tools provided for complete removal).
by St_W
Jan 17, 2018 20:39
Forum: Beginners
Topic: Sample programs
Replies: 50
Views: 1179

Re: Sample programs

Most of your tasks should be very easy to implement with FreeBasic. Just the user interface may be a bit more complicated. But let's get started with the easiest things. For file management tasks see the following overview page in the wiki and the commands referenced there for more details: https://...
by St_W
Jan 16, 2018 16:34
Forum: Projects
Topic: FreeBasic IDE-poseidonFB(Update 2018.02.23)
Replies: 764
Views: 50405

Re: FreeBasic IDE-poseidonFB(Update 2018.01.14)

Unfortunately code completion really slows down the editor considerably when bigger headers (like the windows headers) are used. Would be great if the performance could be improved or at least the impact on the input lag could be reduced (without turning off code completion completely). Apart from t...
by St_W
Jan 16, 2018 16:29
Forum: General
Topic: Benefits of inline if?
Replies: 31
Views: 749

Re: Benefits of inline if?

That's probably what marcov meant. If IIF were implemented as a function all arguments would be evaluated. But as it's an inline IF it behaves like an IF statement.

Go to advanced search