Tx for feedback, but differences seem actually to be caused by C/ASM mode and/or 32/64bit mode.
Compiling following code on x86, Windows, ASM mode, results here in a gain of speed with _ValdD by nearly 50% ... :D
PB 6.21: (with debugger)
ValD: 1193 ms
_ValD: 511 ms
PB 6.21: (no debugger)
ValD ...
Search found 83 matches
- Thu Oct 09, 2025 3:07 am
- Forum: Coding Questions
- Topic: atof Replacement for ValD
- Replies: 7
- Views: 824
- Mon Oct 06, 2025 7:22 am
- Forum: Coding Questions
- Topic: atof Replacement for ValD
- Replies: 7
- Views: 824
atof Replacement for ValD
Following the hints in https://www.purebasic.fr/english/viewtopic.php?t=87644 , I verified that using atof is actually much more faster than built-in ValD().
Speed test for 100000 string conversions:
ValD: 785ms
with atof: 494
Below a small code that could be used as replacement, just comment out ...
Speed test for 100000 string conversions:
ValD: 785ms
with atof: 494
Below a small code that could be used as replacement, just comment out ...
- Wed Jul 30, 2025 6:11 pm
- Forum: Coding Questions
- Topic: ComatePlus: Replace in Word does not work
- Replies: 1
- Views: 180
ComatePlus: Replace in Word does not work
Hi all,
I need to replace specific placeholder text in a Word document, so I thought using Comate might be a good idea,
The following code should replace the placeholder <date> in a word document with the actual date and save the modified text as new document.
But the code does not work properly ...
I need to replace specific placeholder text in a Word document, so I thought using Comate might be a good idea,
The following code should replace the placeholder <date> in a word document with the actual date and save the modified text as new document.
But the code does not work properly ...
- Fri Jun 13, 2025 6:20 pm
- Forum: Coding Questions
- Topic: Check if Edge ist installed
- Replies: 3
- Views: 416
Re: Check if Edge ist installed
Thank you for confirmation, great. I was a little bit in doubt, whether a missing Edge would rise an system error message when initalising a webgadget with flag #PB_Web_Edge
- Fri Jun 13, 2025 10:32 am
- Forum: Coding Questions
- Topic: Check if Edge ist installed
- Replies: 3
- Views: 416
Check if Edge ist installed
Hi all,
I'm using PB on Windows and would like to force the Edge mode when using the webgagdet.
Is the following approach fail-safe, meaning that no system error message boxes will appear in case Edge is not properly installed ?
wg= WebGadget(#PB_Any, 0, 00, 780, 510, "",#PB_Web_Edge)
If ...
I'm using PB on Windows and would like to force the Edge mode when using the webgagdet.
Is the following approach fail-safe, meaning that no system error message boxes will appear in case Edge is not properly installed ?
wg= WebGadget(#PB_Any, 0, 00, 780, 510, "",#PB_Web_Edge)
If ...
- Thu Dec 12, 2024 7:36 am
- Forum: Coding Questions
- Topic: AddKeyboardShortcut not working when having a webgadget with flag #PB_Web_Edge
- Replies: 2
- Views: 527
Re: AddKeyboardShortcut not working when having a webgadget with flag #PB_Web_Edge
Thank you for this info, I was not aware of this yet.
But:the problem also occurs with key combinations that are not reserved by system, for example when using #PB_Shortcut_Control|#PB_Shortcut_Pad0.
I also was not able to find any working key combination with edge mode yet.
So I think, that there ...
But:the problem also occurs with key combinations that are not reserved by system, for example when using #PB_Shortcut_Control|#PB_Shortcut_Pad0.
I also was not able to find any working key combination with edge mode yet.
So I think, that there ...
- Wed Dec 11, 2024 4:11 am
- Forum: Coding Questions
- Topic: AddKeyboardShortcut not working when having a webgadget with flag #PB_Web_Edge
- Replies: 2
- Views: 527
AddKeyboardShortcut not working when having a webgadget with flag #PB_Web_Edge
When setting #PB_Web_Edge flag, keyboard shortcuts are not working anymore.
#win=0
#web=1
OpenWindow(#win,0,0,1024,768,"Test")
If IsWindow(#win)
AddKeyboardShortcut(#win,#PB_Shortcut_Control|#PB_Shortcut_Shift|#PB_Shortcut_I,100)
AddKeyboardShortcut(#win,#PB_Shortcut_Control|#PB_Shortcut ...
#win=0
#web=1
OpenWindow(#win,0,0,1024,768,"Test")
If IsWindow(#win)
AddKeyboardShortcut(#win,#PB_Shortcut_Control|#PB_Shortcut_Shift|#PB_Shortcut_I,100)
AddKeyboardShortcut(#win,#PB_Shortcut_Control|#PB_Shortcut ...
- Fri Aug 16, 2024 10:33 am
- Forum: Coding Questions
- Topic: ZBAR examples
- Replies: 28
- Views: 9520
Re: ZBAR examples
@infratec, thank you very much for the include and sample.
Selecting a video source and taking a qr code by camera works well.
Could you please help with the following further questions, too ?
- when user closes scan window, the zbar_processor_user_wait seems still to be active
If I change line ...
Selecting a video source and taking a qr code by camera works well.
Could you please help with the following further questions, too ?
- when user closes scan window, the zbar_processor_user_wait seems still to be active
If I change line ...
- Sat Jul 27, 2024 3:52 pm
- Forum: Tricks 'n' Tips
- Topic: Access JavaScript functions inside the WebGadget.
- Replies: 33
- Views: 32363
Re: Access JavaScript functions inside the WebGadget.
I enhanced this code with some new functionality.
- Set and get user agent to be used by webgadget
- Check if webgadget is type of #PB_Web_Edge
- SetExplorerFeatures (to force webgadget use IE 11 if #PB_COMPILER_VERSION <570)
- Fix: ExecuteJavascript -> Parameters need to be set in descending order ...
- Set and get user agent to be used by webgadget
- Check if webgadget is type of #PB_Web_Edge
- SetExplorerFeatures (to force webgadget use IE 11 if #PB_COMPILER_VERSION <570)
- Fix: ExecuteJavascript -> Parameters need to be set in descending order ...
- Mon Jul 08, 2024 7:17 am
- Forum: Tricks 'n' Tips
- Topic: QRCode/Barcode Scanner (using ZBar)
- Replies: 1
- Views: 944
QRCode/Barcode Scanner (using ZBar)
Code snippet to scan/readbarcodes via webcam. It depends on the ZBar lib command line tools (download from https://zbar.sourceforge.net/download.html ).
Maybe someone could help to improve:
- remove the console window (starting with #PB_Program_Hide is no option, for you won't see the camera ...
Maybe someone could help to improve:
- remove the console window (starting with #PB_Program_Hide is no option, for you won't see the camera ...
- Fri Jun 09, 2023 6:30 am
- Forum: Tricks 'n' Tips
- Topic: Statistic Module (cross platform)
- Replies: 5
- Views: 1023
Re: Statistic Module (cross platform)
Thank you idle and jassing, I just added corrections in first post
- Thu Jun 08, 2023 6:33 pm
- Forum: Tricks 'n' Tips
- Topic: Statistic Module (cross platform)
- Replies: 5
- Views: 1023
Statistic Module (cross platform)
Hope this might be useful for someone: this module helps to compute statistical values from chronological data , e.g. from heart rate monitors.
You can pass data as string, array, as sqlite database or as text file
Filtering and aggreagation (e.g. only consideration of specific weekdays or time ...
You can pass data as string, array, as sqlite database or as text file
Filtering and aggreagation (e.g. only consideration of specific weekdays or time ...
- Fri Apr 28, 2023 2:45 pm
- Forum: Coding Questions
- Topic: HTML to RTF Lib
- Replies: 7
- Views: 1455
Re: HTML to RTF Lib
Try this:
result=htmltortf_file(ssource$,sdest$,@cs)
TX, I alrerady tried, but this does not work, too.
I also tried with .l instead of .i (btw, is there even a difference on 32bit ?).
It is really strange, for the C sample code works.
But it is not a free dll according to the web page.
It's ...
result=htmltortf_file(ssource$,sdest$,@cs)
TX, I alrerady tried, but this does not work, too.
I also tried with .l instead of .i (btw, is there even a difference on 32bit ?).
It is really strange, for the C sample code works.
But it is not a free dll according to the web page.
It's ...
- Fri Apr 28, 2023 11:31 am
- Forum: Coding Questions
- Topic: HTML to RTF Lib
- Replies: 7
- Views: 1455
Re: HTML to RTF Lib
Tx, sorry, I forget: I'm using PB 32 bit versionint in C is long in PureBasic, otherwise it can't work with the PB 64-bit version if you use it.
- Fri Apr 28, 2023 8:23 am
- Forum: Coding Questions
- Topic: HTML to RTF Lib
- Replies: 7
- Views: 1455
HTML to RTF Lib
Hello,
I found a free DLL to convert HTML to RTF ( https://sautinsoft.com/products/convert-rtf-to-html-com-win32-html-to-rtf/rtf-to-html-and-html-to-rtf.php ). The conversion just needs one API call, sample code (C) is included in the download package.
I was able to translate to PB and call the DLL ...
I found a free DLL to convert HTML to RTF ( https://sautinsoft.com/products/convert-rtf-to-html-com-win32-html-to-rtf/rtf-to-html-and-html-to-rtf.php ). The conversion just needs one API call, sample code (C) is included in the download package.
I was able to translate to PB and call the DLL ...