Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Comparing 2 strings to see how similar they are (spell checker style)

Author
Message
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 29th Mar 2006 12:03 Edited at: 29th Mar 2006 12:04
I have found source code to perform a check against two strings and return a numerical result depending on how similar they are. It's called Levenshtein Distance. I would love to have this as a DLL where a single command would return the result of the check. eg: Result = Compare String(t1$,t2$).
However I am a 'DBP only man' and I lack the knowledge to make the DLL myself. Is anyone willing/able to take the code and make a DLL with it? I don't know how much work is involved in the making of a DLL but having the source code should surely help a lot.

I fully expect this to drop off the page without anyone taking up the challenge but here's hoping ...

Here is the code in C++ (with some initial comments):


Code in Visual Basic:


Code in Java:



Thanks


Scilynt
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 29th Mar 2006 12:52
Will this do?

(And if it does, then yes, the code did help!)

Attachments

Login to view attachments
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 29th Mar 2006 13:12 Edited at: 29th Mar 2006 13:15
That's awsome!

Once again, you have not only made the DLL but have made it appear fully integrated into DBP with the help files and keyword files much like your d3d plugin.

Thank you so very, very much


Scilynt
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 29th Mar 2006 13:23
Your welcome, and the keywords have to be there, drives me mad without having the commands highlighted. The help is only there due to the one command, probably wouldn't have been if there was more .
Matinuker
20
Years of Service
User Offline
Joined: 25th Mar 2004
Location:
Posted: 29th Mar 2006 21:11 Edited at: 29th Mar 2006 21:27
Scilynt, I was wondering whether you could do me a big favour.

Could you send me an either VC++ 6.0/.net 2003 solution that has just
one blank command that will compile a .dll for DBP?

I can do the rest. If you don't have time or don't want to then it's
fine, it would just be a big help if you did

Edit: It could even be in Dev-C++

Scilynt
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: .-#-.
Posted: 29th Mar 2006 23:33
You can get two visual studio projects from your DBP installation directory under Help\Documents\Files\Third Party Commands\. The first doesn't access Pro's internals, the second does. If you need access to the some internal stuff, and you're aiming for v5.9+ then you'll need the new globstruct files, they're stickied somewhere (or linked in one of the stickies).

The project files for VS6, but any VS.NET version will convert them to solutions.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 30th Mar 2006 12:03
This is just silly! Silly! Silly!

Fantastic work again, thank you. I've had to create a new folder now of all the TPCs I have installed and what they do. There's so many extras these days that it's impossible to remember what commands you have at your disposal.

Matinuker
20
Years of Service
User Offline
Joined: 25th Mar 2004
Location:
Posted: 30th Mar 2006 12:17
xtom
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Ireland
Posted: 30th Mar 2006 14:50
Sounds like a cool dll guys. Gonna try it out now.

Login to post a reply

Server time is: 2024-04-26 22:04:25
Your offset time is: 2024-04-26 22:04:25