Alternative:
instead of LPVOID, you can also use the FB equivalent: Any Ptr ...
and, instead of cast() use: CPtr() (to make it more FB 'look alike')
CPtr( Any Ptr, VarPtr(whatever_variable) )
or (simpler IMO):
CPtr( Any Ptr, @whatever_variable )
Search found 3863 matches
- Aug 03, 2021 16:59
- Forum: General
- Topic: Passing different pointer types warning
- Replies: 7
- Views: 923
- Jul 29, 2021 21:05
- Forum: Sources, Examples, Tips and Tricks
- Topic: romuTrio64 PRNG
- Replies: 11
- Views: 1866
Re: romuTrio64 PRNG
@dodicat, thanks for the test, 2TB should suffice for most of those small app's.
- Jul 28, 2021 2:45
- Forum: Sources, Examples, Tips and Tricks
- Topic: romuTrio64 PRNG
- Replies: 11
- Views: 1866
Re: romuTrio64 PRNG
Ain't that, what it's typically called: moaning/groaning/complaining at a high level?dafhi wrote:oh i see what you're doing. dividing by 1e7 rather than delta vars. 10 seconds seems kinda long ..
After all, it's clearly marked as 'DEMO' code ...
- Jul 28, 2021 1:18
- Forum: Sources, Examples, Tips and Tricks
- Topic: romuTrio64 PRNG
- Replies: 11
- Views: 1866
Re: romuTrio64 PRNG
Please explain your logic ... why off?
div 1e6 = one/million, however down to 1/sec = 1e7 if run = 10 sec.
I've tested wih 20 sec first, no significant difference noted ...
The shorter the test-time, the less accuracy can be expected ...
div 1e6 = one/million, however down to 1/sec = 1e7 if run = 10 sec.
I've tested wih 20 sec first, no significant difference noted ...
The shorter the test-time, the less accuracy can be expected ...
- Jul 28, 2021 0:29
- Forum: Sources, Examples, Tips and Tricks
- Topic: romuTrio64 PRNG
- Replies: 11
- Views: 1866
romuTrio64 PRNG
Another new PRNG (c) Mark A. Overton, transated/converted to FB (c) MrSwiss. For more information, check: fomu-random.org A 'quick and dirty' FreeBASIC implementation, with a short DEMO ... Conditions to post here (in this thread) are: everyone, except: d..r..[...], jj... and S...F... (personae's no...
- Jul 23, 2021 16:56
- Forum: Hardware Interfaces / Communication
- Topic: reading/writing to the parallel printer port
- Replies: 9
- Views: 5028
Re: reading/writing to the parallel printer port
You'll need both, the driver and the .dll ...
the .dll alone is not changing anything (it comunicates with the driver).
Q: How to use it? A: Read the documentation driver/.dll ...
the .dll alone is not changing anything (it comunicates with the driver).
Q: How to use it? A: Read the documentation driver/.dll ...
- Jul 20, 2021 18:01
- Forum: General
- Topic: Poke Modifying Previous Address' Value
- Replies: 24
- Views: 2072
Re: Poke Modifying Previous Address' Value
There are two possible ways, to eliminate both, peek & poke:
by array(index) or by ptr[index].
- use a UInteger array
- use a UInteger ptr
by array(index) or by ptr[index].
- Jul 20, 2021 16:10
- Forum: General
- Topic: Poke Modifying Previous Address' Value
- Replies: 24
- Views: 2072
Re: Poke Modifying Previous Address' Value
Sorry, the posted code-fragment makes "no sense at all" as it is.
Why don't elaborete some more, about "what you want to achieve" with the code?
Alternatively, post the whole code, that deals with the issue ...
Why don't elaborete some more, about "what you want to achieve" with the code?
Alternatively, post the whole code, that deals with the issue ...
- Jul 20, 2021 14:53
- Forum: Hardware Interfaces / Communication
- Topic: reading/writing to the parallel printer port
- Replies: 9
- Views: 5028
Re: reading/writing to the parallel printer port
Simply put: only DOS allowes "direct HW (hardware) access". All the other more modern OS's (operating systems) don't do that, in fact they "protect against direct HW access". You'll have to use something like: in "Try to use inpout32.dll" thread to achieve that (on wind...
- Jul 20, 2021 2:13
- Forum: General
- Topic: sng problem, fbc, gcc
- Replies: 2
- Views: 417
Re: sng problem, fbc, gcc
That result is OK, since Single doesn't posses the necessary amount of precision, for such small differences.dafhi wrote:num / (num+1) supposed to be less than 1 ... on my machine i am seeing 1
Use a Double instead ...
- Jul 18, 2021 21:08
- Forum: Documentation
- Topic: Wiki improvements
- Replies: 764
- Views: 220834
Re: Wiki improvements
It clearly states: thread stack which is different from application stack, which the -t switch addresses.
- Jul 18, 2021 20:58
- Forum: General
- Topic: need particular prng
- Replies: 38
- Views: 3525
Re: need particular prng
There is also: pcg32rr.bi - minimal PCG32_random_r implementation ( (c) Melissa E. O'Neill ) in Forum/Projects.
This is a 32-bit PRNG, as opposed to dodicat's 64-bit PRNG.
This is a 32-bit PRNG, as opposed to dodicat's 64-bit PRNG.
- Jul 09, 2021 14:53
- Forum: Beginners
- Topic: Installing Free Basic on Windows 10
- Replies: 3
- Views: 1578
Re: Installing Free Basic on Windows 10
Another approach is, to get Installation Instructions from the FB-Documentation (online).
Also, check on: FreeBASIC Requirements ... (OS dependent prerequisites).
Also, check on: FreeBASIC Requirements ... (OS dependent prerequisites).
- Jul 01, 2021 13:46
- Forum: Community Discussion
- Topic: Request: Asm keyword abbreviation
- Replies: 11
- Views: 1427
Re: FreeBASIC 1.08.1 and 1.09.0 Development
Could it be possible to add a symbol like ! ( or another one ) as an abbreviation of the keyword asm? There is already the ASM-Block statement, therefore another short-cut makes little sense. (also notable: short-cuts impact negatively on code's readability, aka: being more cryptic) ' ... (FB code)...
- Jun 30, 2021 16:12
- Forum: Libraries & Headers
- Topic: FBImage static Win/Lin 32/64-bit
- Replies: 67
- Views: 34553
Re: FBImage static Win/Lin 32/64-bit
Then you'll have to stick with FBC <= 1.07.3.D.J.Peters wrote:no don't mix native integer with long :-(
From version 1.08.0 it's either LONG or LONGINT as per "ScreenInfo/ImageInfo" in the Doc's. ;-)