maybe you need to define it. inlineC is in the main function scope.
It why I wrote my tool so I could use c libs directly but that's a slightly different use case. It doesn't compile it it just preprocess it so you have access to exported functions and symbols. Then you can call the c functions directly but they are functions from a lib.
idle wrote: ↑Fri Jun 09, 2023 10:20 pm
Well you kind of can as long as it's in the same scope but it's confusing look at fast hash function in my bloom filter
Right, i discovered that.
idle wrote: ↑Fri Jun 09, 2023 10:20 pm
I will look at this when I get time later today.
No worries. Not critical; just seeing what I can and can't do with it. (Like you can exploit it to access variables outside of a module)
The issue is simply that PB puts all inline c into the main functions scope or the scope of the current function
If Fred could just move !#include !#define #param() out of main scope we could do a lot more without needing to add hacks to get around the limitations.
Just so others reading the thread get it, you can declare and call a c function within the scope of a procedure but not externally, if that makes sense.