Search found 3560 matches
- Wed Feb 21, 2024 3:48 am
- Forum: Coding Questions
- Topic: StrD and Rounding
- Replies: 17
- Views: 627
Re: StrD and Rounding
Interesting example though I have not seen runaway as high as that with my typical floating point math. I do get burned when doing lazy trigonometry on small shapes on a canvasgadget. :oops: Scaling really saves the day. Simple scaling applied to STARGATE's example: #ML_SF = 10000 Define.i i Define....
- Tue Feb 20, 2024 7:03 pm
- Forum: Coding Questions
- Topic: StrD and Rounding
- Replies: 17
- Views: 627
Re: StrD and Rounding
This is a problem of scale.
You should use fixed point math for picoliters(e-12) and milliliters(e-3), etc.
You should use fixed point math for picoliters(e-12) and milliliters(e-3), etc.
- Sat Feb 17, 2024 8:22 pm
- Forum: Coding Questions
- Topic: Some troubles and I don't know how to report
- Replies: 6
- Views: 321
Re: Some troubles and I don't know how to report
When I have weird behavior, I'm forced to simplify the code and/or write info to log files before crash. I use prototypes instead of CallFunction. Then inspect each prototype for valid address. I use threads and semaphores, but never threaded variables. My databases are under 1GB. So far, v6.10b6 is...
- Thu Feb 15, 2024 4:00 pm
- Forum: Coding Questions
- Topic: Get dead keys in canvases?
- Replies: 6
- Views: 466
Re: Get dead keys in canvases?
[ctrl] and [alt] have no real action by themselves so what are you trying to accomplish? Here is mousemove + [ctrl] or [alt] on the canvasgadget. #CG = 0 #EV_KS_CTRL_T = 100 #EV_KS_ALT_T = 101 #EV_KS_TAB = 102 OpenWindow(0, 0, 0, 500, 500, "Canvas Keyboard Shortcuts", #PB_Window_ScreenCent...
- Fri Feb 09, 2024 8:20 pm
- Forum: Coding Questions
- Topic: Get dead keys in canvases?
- Replies: 6
- Views: 466
Re: Get dead keys in canvases?
I don't understand your requirement? I use dozens of keyboard shortcuts with the canvasgadget. #EV_KS_CTRL_T = 100 #EV_KS_ALT_T = 101 #EV_KS_TAB = 102 OpenWindow(0, 0, 0, 500, 500, "Canvas Keyboard Shortcuts", #PB_Window_ScreenCentered | #PB_Window_SystemMenu) CanvasGadget(0, 0, 0, 500, 50...
- Sun Feb 04, 2024 8:52 pm
- Forum: Coding Questions
- Topic: Purebasic Interacting with other windows?
- Replies: 10
- Views: 544
Re: Purebasic Interacting with other windows?
Don't mess with the mouse.
Change the idle state.
Change the idle state.
- Thu Feb 01, 2024 7:01 pm
- Forum: Coding Questions
- Topic: How to get digits from barcode reader?
- Replies: 6
- Views: 475
Re: How to get digits from barcode reader?
There should be an api or dll you can poll for the barcode reader input?
How you choose to display in your gui depends on where you put the user focus.
How you choose to display in your gui depends on where you put the user focus.
- Thu Feb 01, 2024 6:34 pm
- Forum: Assembly and C Programming in PureBasic
- Topic: Struct explanation request
- Replies: 10
- Views: 1520
Re: Struct explanation request
System languages needed pointers to be efficient.
Even Fortran added pointers later.
Basic had clunky varptr() and addressof().
Yes, C++ became a bloated mess with technical debt and over a 1000 pages of definitions.
But, you can still choose to code C++ with a C approach and do very well.
Even Fortran added pointers later.
Basic had clunky varptr() and addressof().
Yes, C++ became a bloated mess with technical debt and over a 1000 pages of definitions.
But, you can still choose to code C++ with a C approach and do very well.
- Fri Jan 26, 2024 1:46 am
- Forum: Coding Questions
- Topic: Determine the type of drive
- Replies: 4
- Views: 415
Re: Determine the type of drive
Procedure.i SL_IsLocalDrive(Drive$) Drive$ = UCase(Left(Drive$, 1)) Protected.i nDrive = RealDriveType_(Asc(Drive$) - 65, 0) Select nDrive Case #DRIVE_NO_ROOT_DIR nDrive = 0 Case #DRIVE_UNKNOWN ndrive = 0 Case #DRIVE_REMOVABLE nDrive = 1 Case #DRIVE_FIXED nDrive = 1 Case #DRIVE_REMOTE nDrive = 0 Ca...
- Thu Jan 25, 2024 8:07 pm
- Forum: General Discussion
- Topic: Windows defender's false positives - again
- Replies: 7
- Views: 748
Re: Windows defender's false positives - again
We have to use cylance at my company. Every... And I mean really every compiled file is an Virus in the eyes of this crappy thing. But, this AV don't Block... It only delete after the app is closed and write a mimimi-mail to our admins. At the end of some days I have around 50 entries for purbasic_...
- Wed Jan 24, 2024 4:44 pm
- Forum: Feature Requests and Wishlists
- Topic: Library conversion to Rust
- Replies: 1
- Views: 383
Re: Library conversion to Rust
Maybe wait for the big guys to suffer such a transition?
SQLite, libpng, libcurl, and on and on...
Most languages have C interoperability anyway.
SQLite, libpng, libcurl, and on and on...
Most languages have C interoperability anyway.
- Mon Jan 22, 2024 8:26 pm
- Forum: Coding Questions
- Topic: Where am I? - IDE Improvement
- Replies: 10
- Views: 1020
Re: Where am I? - IDE Improvement
This is the tool I use. Modified from kiffi's code. With the cursor in the editor, press Ctrl+Q and the procedure list is highlighted where I am. ;-{ ct_show_procedure.pb ; ================================================= ; kiffi, https://www.purebasic.fr/german/viewtopic.php?f=8&t=28267 ; GetP...
- Sat Jan 20, 2024 6:06 pm
- Forum: Coding Questions
- Topic: Thread and gadget creation
- Replies: 25
- Views: 1094
Re: Thread and gadget creation
Semaphores can signal other semaphores.
My main loop (gui) never attempts to touch the threaded data until a thread posts an event.
My main loop (gui) never attempts to touch the threaded data until a thread posts an event.
- Sat Jan 20, 2024 5:33 pm
- Forum: Feature Requests and Wishlists
- Topic: Numeric Maps
- Replies: 17
- Views: 1609
Re: Numeric Maps
Is there a significant speed improvement with map access using integer keys?
- Sat Jan 20, 2024 5:30 pm
- Forum: Coding Questions
- Topic: Thread and gadget creation
- Replies: 25
- Views: 1094
Re: Thread and gadget creation
I prefer semaphores since they are more flexible. And I can effectively lock data with semaphores, without adding mutexes.
I cannot signal multiple threads with a mutex.
I cannot signal multiple threads with a mutex.