02 March 2017

A Dynamic Array Library

James Gaite created an impressive extension to the standard GFA-BASIC 32 array functionality. In response to comments made in a thread on the GB32 forum, he has spent some time trying to compile some basic dynamic objects that will work within a UDT, as well as making GFA-BASIC's handling of arrays in variants a bit more flexible.

The results are contained in the zipped library file containing a compiled library file (lg32) and a with a brief help file. For easy access you should copy the lg32-file into the source directory of the project you are working on. Including a library file in your project forces the IDE to search for that file in the current working directory first.
Please note that this is a work in progress, as can be seen by the version number.
Dynamic Array Library (version 0.23 Build 10) : DynamicArrays.zip

Main features (but not all):
  1. A Hash table (THash) that:
     - can be used in User-defined Types and Arrays, and can be passed ByRef to functions and subroutines;
       - can 'remember' sort preferences and add all new keys accordingly.
  2. . A Dynamic Variable-length String Array (DSArray or DSA) which:
       - can be used in User-defined Types and Arrays and be passed to all routines;
       - can 'remember' sort preferences and add all new additions accordingly;
       - has basic find, find/replace and find/remove functions.
  3. A basic Variable-length String Variable that can be used in User-defined Types.
  4. New commands and functions for Redim'ing and setting values in a dynamic array in a variant.
Please post any questions (or bugs you might discover) to this thread on the GB32 forum http://gb32.proboards.com/thread/117/dynamic-variables-arrays or as comments attached to this blog article.

20 February 2017

Tip: Using mt.exe to include a manifest

A tip from Peter Harder on how to use the mt.exe tool included with the Windows SDK.

The GFA-Basic editor can not include a *.manifest file into a created *.exe file. However, the Microsoft Windows Software Development Kit (SDK) contains a file named "mt.exe" that can
include the *.manifest file after creating the *.exe file.

I uploaded an examples that includes also the mt.exe and a batch file that shows how to call the mt.exe:

Just follow the instructions in the readme.txt.
For a complete description of mt.exe tool use Google and search for "mt.exe".