A collection of some of the most useful little library tools which I make use of on a regular basis, all collected and gathered together for ease of inclusion into a program.
There's sort routines, search routines (a recent addition, tossed in and saved from the binary search topic), various text and graphic routines, extended timers, image save routines, safe font loading, spell checking, circle/ellipse filling, compression/decompression routines, conversion routines for various things...
A little bit of everything which I tend to have found useful to have at hand, from over my years of coding in QB64.
For now, there's not much written on HOW to make use of any of these, but they should be simple enough to sort out if you read the comments, like so:
m
= _MEM(value
) 'Point it to use value 'On 64 bit OSes, an OFFSET is 8 bytes in size. We can put it directly into an Integer64
_MEMGET m
, m.OFFSET
, ConvertOffset&&
'Get the contents of the memblock and put the values there directly into ConvertOffset&& 'However, on 32 bit OSes, an OFFSET is only 4 bytes. We need to put it into a LONG variable first
_MEMGET m
, m.OFFSET
, temp&
'Like this ConvertOffset&& = temp& 'And then assign that long value to ConvertOffset&&
A function to Convert Offsets to Integer values... Even without a demo, folks should be able to figure out to do something like X = ConvertOffset(Y).
For the SpellChecker, we have the following:
FUNCTION SpellCheck
(TestWord$
, CorrectWord$
) 'IF Spellcheck = 100, we have a perfect 100% match for our words
'If the value is from -1 to -100, we have a percent match, so the routine "grades" how close the match is.
'If the value is 0, the words are just too different for the routine to think it's a match at all.
'Personally, I'd consider anything with an 80+ score to be a close enough match usually.
....more stuff
The comments should explain how it works well enough, I hope.
As time (and motivation) allows, I'll post examples here of how to make use of these little routines one by one, but for the courageous who like to play around and figure things out themselves, feel free to grab it and use it in your own stuff.
If you have any questions about a routine (or set of routines), feel free to ask, and I'll explain/demo those first.
Secondary Dropbox link, in case the forum download doesn't work for everyone:
https://www.dropbox.com/s/bvyyl5i5xubrw9p/SET%20%28Steve%27s%20Extended%20Toolset%29.7z?dl=1