Search found 7 matches
- Fri Oct 20, 2017 10:56 pm
- Forum: Tricks 'n' Tips
- Topic: Faster string concatenation: Alternative method
- Replies: 15
- Views: 7886
Re: Faster string concatenation: Alternative method
Also, correct me if I'm wrong, but doesn't PureBasic use copy-on-write for strings passed to procedures? I did a quick-and-dirty test for creating two strings of different length and passing them to a procedure (which does nothing but return the length of the string). Even though string #1 was only ...
- Fri Oct 20, 2017 9:53 pm
- Forum: Tricks 'n' Tips
- Topic: Faster string concatenation: Alternative method
- Replies: 15
- Views: 7886
Re: Faster string concatenation: Alternative method
I wanted my code to balance speed against ease of use, and I wanted it to be easy to understand. Theoretically I could have fiddled with pointers more to eke out more speed, but I wanted something I could just throw strings into.
I'd be using this for situations when the length of strings is ...
I'd be using this for situations when the length of strings is ...
- Tue Oct 17, 2017 1:15 am
- Forum: Tricks 'n' Tips
- Topic: Faster string concatenation: Alternative method
- Replies: 15
- Views: 7886
Faster string concatenation: Alternative method
I see someone else has posted his solution for speeding up string concatenation, but I cobbled together this code today, and I thought I should share it. My system uses one structure definition and two procedures, so it should be simple to use. (It also uses Space() instead of AllocateMemory(), so ...
- Fri Aug 04, 2017 11:39 pm
- Forum: Coding Questions
- Topic: Problem with Virtual Keys
- Replies: 6
- Views: 2532
Re: Problem with Virtual Keys
This is an ancient thread :mrgreen: , but in case anyone's searching how to use the odd punctuation keys with AddKeyboardShortcut in Linux, here is some code that works on both my Windows machine and my Linux laptop:
CompilerIf #PB_Compiler_OS = #PB_OS_Linux
#KEY_COMMA = 44 ; Asc(",")
#KEY ...
CompilerIf #PB_Compiler_OS = #PB_OS_Linux
#KEY_COMMA = 44 ; Asc(",")
#KEY ...
- Thu Jul 13, 2017 2:45 pm
- Forum: Feature Requests and Wishlists
- Topic: Lexers support for Scintilla
- Replies: 9
- Views: 5647
Re: Lexers support for Scintilla
I know this is an ancient thread, but in case anyone's searching the forums for GoScintilla, I found version 3 on Github:
https://github.com/tajmone/purebasic-ar ... oScintilla
https://github.com/tajmone/purebasic-ar ... oScintilla
- Tue May 02, 2017 1:07 am
- Forum: Coding Questions
- Topic: Extract XML data from MS .docx file
- Replies: 5
- Views: 2516
Re: Extract XML data from MS .docx file
IdeasVacuum: Your code (or at least what you've presented here) doesn't call UseZipPacker(). You need to call that before trying to examine a DOCX or XLSX file's contents.
- Sun Aug 14, 2016 4:40 am
- Forum: Coding Questions
- Topic: Is it safe to call UseZipPacker more than once?
- Replies: 3
- Views: 1316
Is it safe to call UseZipPacker more than once?
I'm thinking of writing a PureBasic module for reading DOCX files. Since a DOCX file is really a ZIP file, I'd call UseZipPacker() before reading the file.
My question is: If I want to write another module in the same program that also accesses some kind of ZIP file, is it safe for that other ...
My question is: If I want to write another module in the same program that also accesses some kind of ZIP file, is it safe for that other ...