Search found 464 matches
- Tue Nov 29, 2022 7:17 pm
- Forum: Coding Questions
- Topic: Which structure to use , Arrays, Lists & Structures ?
- Replies: 12
- Views: 770
Re: Which structure to use , Arrays, Lists & Structures ?
What is the best/fastest structure to use , Arrays, Lists , etc. ? Use a simple list: NewList functionsList$() ; Place here the code that fills the list. If Not ReadFile(0, "codeFile.pb") Debug "Error" End EndIf ; Skip BOM ReadStringFormat(0) While Not Eof(0) codeLine$ = ReadStr...
- Sun Nov 27, 2022 12:21 pm
- Forum: Coding Questions
- Topic: Which structure to use , Arrays, Lists & Structures ?
- Replies: 12
- Views: 770
Re: Which structure to use , Arrays, Lists & Structures ?
Doesn't it make more sense to have a search program where you can enter a keyword, and it will show you in which code files it was found? The PureBasic IDE already offers you the possibility to search for text in all files of a directory (including their subdirectories): Click on "Edit" in...
- Sat Nov 26, 2022 6:29 pm
- Forum: General Discussion
- Topic: Is it possible to find defined and unused variables?
- Replies: 18
- Views: 2216
Re: Is it possible to find defined and unused variables?
My tool now shows the output of the PureBasic compiler when the code could not be preprocessed.
- Sun Nov 20, 2022 10:58 pm
- Forum: Coding Questions
- Topic: [solved] Calculate the checksum of the file (partially).
- Replies: 5
- Views: 392
Re: Calculate the checksum of the file (partially).
Code: Select all
hash$ = FileFingerprint(filePath$, #PB_Cipher_MD5Plugin, 0, 0, FileSize(filePath$) - 128)
- Mon Nov 14, 2022 11:29 pm
- Forum: Tricks 'n' Tips
- Topic: Upper and Lower Case Mapping for Unicode
- Replies: 32
- Views: 6747
Re: Upper and Lower Case Mapping for Unicode
I would need to implement https://www.unicode.org/Public/UCD/latest/ucd/CaseFolding.txt Yes. Maybe it should be a separate module because the codes posted in this thread completely fulfills the thread topic, at least the simple variant of case mapping. Comparing strings in a case-insensitive manner...
- Sun Nov 13, 2022 5:53 pm
- Forum: Feature Requests and Wishlists
- Topic: String length should be stored for string variables
- Replies: 51
- Views: 11121
Re: String length should be stored for string variables
@mk-soft After this feature is implemented, the PB string functions Left() , Right() etc. no longer search for a null character, but use the string length field value prefixed to the string. The problem: The WinAPI function does not update the value of the string length field. Procedure WinAPI_Funct...
- Sun Nov 13, 2022 12:53 pm
- Forum: Tricks 'n' Tips
- Topic: Upper and Lower Case Mapping for Unicode
- Replies: 32
- Views: 6747
Re: Upper and Lower Case Mapping for Unicode
Your codes seem to work correctly now. Thanks.
@idle: Strictly speaking, your function _StrCmpNC() is not correct because case-folding is usually applied for comparing, but as your function is, I think it can be useful as well.
@idle: Strictly speaking, your function _StrCmpNC() is not correct because case-folding is usually applied for comparing, but as your function is, I think it can be useful as well.
- Sun Nov 13, 2022 12:09 pm
- Forum: Feature Requests and Wishlists
- Topic: String length should be stored for string variables
- Replies: 51
- Views: 11121
Re: String length should be stored for string variables
- sometimes in PB, people allocate a string variable, and then poke a different string over it (or an API call writes over it) Yes, I obviously didn't think of that at the time when I created that feature request, although I also did that in my codes sometimes. Mostly this is done with WinAPI funct...
- Sun Oct 30, 2022 1:00 pm
- Forum: Coding Questions
- Topic: Cutting an image
- Replies: 3
- Views: 403
Re: Cutting an image
I had once scanned a lot of photos with a scanner and then wrote a tool to cut away the white borders from the photos.
Here I have uploaded it now: Click
Here I have uploaded it now: Click
- Sat Oct 29, 2022 10:42 pm
- Forum: Applications - Feedback and Discussion
- Topic: RegEx engine module that builds NFA/DFA and uses it for matching
- Replies: 6
- Views: 1214
Re: RegEx engine module that builds NFA/DFA and uses it for matching
Your work can he translate REGEX in something understandable by the first fool to come ? (like me for exampler :mrgreen: ) If you have trouble imagining how a RegEx works, you can use a RegEx visualizer or a tool that explains the RegEx . And if not, know you a very very simple freeware, for babies...
- Sat Oct 29, 2022 9:47 pm
- Forum: General Discussion
- Topic: Is it possible to find defined and unused variables?
- Replies: 18
- Views: 2216
- Wed Oct 26, 2022 6:55 pm
- Forum: General Discussion
- Topic: Is it possible to find defined and unused variables?
- Replies: 18
- Views: 2216
Re: Is it possible to find defined and unused variables?
Same error Which code did you check with the tool? Remember: the code must be compilable by the PB compiler. Code like the following, for example, will not work because it is incomplete and therefore not compilable: Mark(1)\color = $BBBBBB Mark(2)\color = $32CEED This code is complete and works the...
- Sun Oct 23, 2022 2:11 pm
- Forum: General Discussion
- Topic: Is it possible to find defined and unused variables?
- Replies: 18
- Views: 2216
Re: Is it possible to find defined and unused variables?
Hello AZJIO,
you are right, the quick hexadecimal number fix was not nice and only partially worked. I have spent now more time and created a new fix.
For structures, only the structure fields are now ignored.
Please try again.
you are right, the quick hexadecimal number fix was not nice and only partially worked. I have spent now more time and created a new fix.
For structures, only the structure fields are now ignored.
Please try again.
- Mon Oct 17, 2022 6:28 pm
- Forum: General Discussion
- Topic: Is it possible to find defined and unused variables?
- Replies: 18
- Views: 2216
Re: Is it possible to find defined and unused variables?
@AZJIO The easiest way is to download the whole code archive. This way you save downloading the individual include files and all code should work right away. Complete archive: Download I began to receive the message often: "Your code is empty or contains syntax errors, so the PB compiler cannot...
- Sun Oct 16, 2022 8:06 pm
- Forum: General Discussion
- Topic: Is it possible to find defined and unused variables?
- Replies: 18
- Views: 2216
Re: Is it possible to find defined and unused variables?
Hello AZJIO, thanks for your feedback. I have improved the tool (and the dependent includes). 1. Can you add bit flags as a parameter to not output WinAPI functions and constants? Exclude structure fields that start with "\". The following is now ignored by default: All identifiers ending ...