Search found 3447 matches
- Jan 20, 2017 20:13
- Forum: Sources, Examples, Tips and Tricks
- Topic: MacroTimersQPC.inc
- Replies: 21
- Views: 6813
Re: MacroTimersQPC.inc
You could improve the repeatability, cutting the uncertainty in the timed period in half, by synchronizing with the timer counter before you start the timed period. In case what I mean by synchronizing is not clear, you implement a loop that delays until the counter value changes. You can get an ide...
- Dec 04, 2016 6:51
- Forum: Community Discussion
- Topic: lack of response
- Replies: 16
- Views: 4336
Re: lack of response
I think in some cases the problem is that the OP is one of the majority of humans not suited for programming, and so cannot understand the answer well enough to recognize it as such :)
- Dec 03, 2016 2:58
- Forum: General
- Topic: Seems impossible to rnd*(ulongint range)
- Replies: 7
- Views: 2146
Re: Seems impossible to rnd*(ulongint range)
There is (64-bit, Windows only) code here that will return a 64-bit cryptographic random number, hardware-generated if the CPU supports the RDRAND instruction, or otherwise generated by the default Cryptographic Service Provider. I forgot to add that the function is relatively slow when returning ra...
- Nov 27, 2016 7:58
- Forum: General
- Topic: QSort 32 bit vs 64 bit FB
- Replies: 28
- Views: 5790
Re: QSort 32 bit vs 64 bit FB
The qsort routine lies deep within a C compiler or a C runtime. It lies mysteriously out of our reach (or most of our reaches anyways)... Yes, but the C source code for it is included in the src\crt directory of the Microsoft Platform SDKs, at least up through the Windows Server 2003 SP1 version, a...
- Nov 26, 2016 5:40
- Forum: General
- Topic: Can't get error code
- Replies: 6
- Views: 1810
Re: Can't get error code
Using:
in the error handler, I get: 6 6
Code: Select all
print err, erl
- Nov 24, 2016 9:09
- Forum: General
- Topic: QSort 32 bit vs 64 bit FB
- Replies: 28
- Views: 5790
Re: QSort 32 bit vs 64 bit FB
For the CRT qsort, when sorting numeric arrays the comparison function need only return the result of a subtraction operation: #include "crt.bi" ''----------------------------------------------- '' Long instead of integer so the code will work '' without alteration on 32-bit and 64-bit FB....
- Nov 22, 2016 13:14
- Forum: General
- Topic: QSort 32 bit vs 64 bit FB
- Replies: 28
- Views: 5790
- Nov 16, 2016 3:05
- Forum: Community Discussion
- Topic: [offtopic]How can you be proud in future of your country with clinton or trump ?
- Replies: 28
- Views: 6590
Re: How can you be proud in future of your country with clinton or trump ?
Checks and Balances??? You must be joking ... - President: REP. - Senate: REP. (majority) - Congress: REP. (majority) Where are there any "Checks and Balances" left ??? - Justice? (Federal-Judges require "PRESIDENTIAL" approval) Majorities in the Senate and House are the result ...
- Nov 14, 2016 7:14
- Forum: Beginners
- Topic: Windows GUI
- Replies: 145
- Views: 32169
Re: Windows GUI
Assuming I understand what you are trying to do, after you finish drawing the image use InvalidateRect to add the client area to the window's update region so the client area will be redrawn on the next WM_PAINT message. You can use GetClientRect to copy the coordinates of the client area to a RECT ...
- Nov 12, 2016 16:18
- Forum: General
- Topic: BitScanForward
- Replies: 35
- Views: 8460
Re: BitScanForward
Yes, thank you.caseih wrote: And regarding your example, &b11111110 is actually -2 in a signed 8-bit integer if I'm not mistaken.
- Nov 11, 2016 21:43
- Forum: General
- Topic: BitScanForward
- Replies: 35
- Views: 8460
Re: BitScanForward
What is the reasoning for the -1? For FreeBASIC, like the Microsoft QuickBASIC it is based on, the operators AND, OR, NOT, and XOR are bitwise operators. I suspect that the -1 value for TRUE was to ensure that NOT TRUE would produce FALSE. To illustrate, using 8-bit signed integers, and assuming th...
- Nov 11, 2016 17:01
- Forum: General
- Topic: BitScanForward
- Replies: 35
- Views: 8460
Re: BitScanForward
I ran the above code on different machines, but it returns -1 no matter what hardware it is tested with. What value should it return? It should return -1 if POPCNT is supported, otherwise 0. Per the Intel instruction set reference available here , for CPUID function 1 (EAX=1), support for the POPCN...
- Nov 11, 2016 16:22
- Forum: Beginners
- Topic: Windows GUI
- Replies: 145
- Views: 32169
Re: Windows GUI
GDI+ can do the conversion, Microsoft example here.
Sorry, no time to code an example.
Sorry, no time to code an example.
Re: Dim
Because local variables are allocated from the stack, and the stack is constantly being accessed, local variables are more likely to be in the cache.
- Nov 08, 2016 13:25
- Forum: Beginners
- Topic: Windows GUI
- Replies: 145
- Views: 32169