SIMPOL Documentation

List of Supplied Libraries

The following table contains a list of the supplied libraries, an X if they are supplied as source, and a brief description of each one. Some of the libraries may be more fully explained in a separate section below.

Table 21.1. Supplied SIMPOL-Language Libraries
NameSourceDescription
abs.smlX Implements the ABS() function for compatibility with SBL. It can also be used in general in SIMPOL, since there is no equivalent.
appframework.smlX Implements an application framework for working with data-aware form style applications. This framework is used by the samples supplied with the SIMPOL Quickstart Guide.
boolstr.smlX Provides functions for converting from and to boolean and datetime types to strings.
bzip2.smlX Wrapper for the BZip2 compression library.
calceval.smlX Contains the calceval() function for evaluating a formula contained in a string and returning the result.
codepageslib.smlX Provides functions for converting from and to SIMPOL characters for various code pages.
colorpalette.smlX Supplies types and functions for working with colors and palette entries. This is primarily used by imagelib.sml for saving images to disk.
conflib.smlX Provides functions reading from and for writing to configuration files that follow the standard for INI files in Windows. In the future other configuration file formats may be supported in this library.
databaseforms.smlX This library implements data-aware, multi-page forms. It contains the entire set of types from the dataform1 family. For more information on programming with these types, see Chapter 23, Using Data-Aware Forms in SIMPOL.
datetimelib.smlX This library provides several date, time, and datetime functions and includes other related libraries to provide a single library for inclusion.
db1lib.smlX Implementation of a dummy group of classes based on the db1 type tags. The purpose is to ensure that viable inline help in the IDE is provided for variables declared using the db1 type tags.
db1util.smlX Provides numerous functions for working with databases. Functions for copying one record to another, determining whether a field is valid or is indexed, converting from field values to string and the reverse, and other functions.
dbconverter.sml  This is the primary data conversion library, for both import and export converters. The design uses a common record structure that is supported by import and export converters as the medium of exchange. Any import converter can be hooked up to any export converter.
errormsgs_en.smlX This error messages library provides a standard method of returning a consistent error message for any of the standard error values listed in errors.sma. This library implements the English language messages.
fastset.smlX This implements the fastset data type for working with sets that allow for string-indexing of objects. This library should be in preference to the objset library in newer code. It is virtually identical in its API but is considerably faster in execution. When working with sets of values or sets of objects that do not need to be string-indexed, it is even faster to use the built-in set data type.
filesyslib.smlX Provides functions for working with files and directories. Currently this includes a function to retrieve the correct directory separator character and another to parse file and path names into their component parts.
formlib.smlX This library provides the additional functionality for loading and saving dataform1 and printform1forms. It also provides the functionality to save dataform1 forms as program source code and to save them as a wxform source program with all the data aware aspects stripped away.
gaugelib.smlX This library includes two types for providing a gauge dialog that can be shown and updated in order to inform the user while your program is doing long operations.
graphicreportlib.sml  This library provides the Graphic Report functionality including saving and loading these reports.
httpclientlib.smlX Contains functions for accessing web pages on the Internet. Includes functions for both the GET and POST style access of web pages.
imagelib.smlX Provides numerous functions for working with databases. Functions for copying one record to another, determining whether a field is valid or is indexed, converting from field values to string and the reverse, and other functions.
int.smlX Implements the INT() function for compatibility with SBL. It can also be used in general in SIMPOL, since there is no equivalent.
jpeglib.smlX Provides types and functions for working with JPEG files. Currently the only functionality is the function to retrieve the size of a JPEG image and a wrapper function to allow that function to be called via the SMEXEC32.DLL interface.
libxml.sml  Provides the full implementation of the XML Document Object Model (DOM) Core Level 1 and Level 2 with some additional capabilities from Level 3. It provides as well, the ability to do XSLT transforms, document validation, and support for HTML documents. There is an example program in the directory projects\dom. That directory also contains documentation about the DOM in HTML format.
lists.smlX Various list and similar types. Includes: list, dlist, ring, queue, and stack. The dlist implementation has gone through extensive testing and modification. Most of these types are meant to be embedded into other types, to provide the ability to manage them in a list.
ltrim.smlX Implements the LTRIM() function for compatibility with SBL. For a more flexible implementation see the ltrim() function in the stringlib.sml library.
mathlib.smlX Contains functions for working with mathematics, such as sin(), cos(), tan(), sqrt(), and others.
mrulib.smlX This library implements a data type for managing most recently used lists, commonly shown as items on a menu. To that end, it can actually manage an entire submenu on its own, including showing a dialog for entries beyond a certain number, managing the entries in a configuration (INI) file, etc.
netinfolib.smlX This library is used for providing network-specific information, such as the currently logged-in user's name.
objset.smlX The objset type and related types are created in this library. This provides a fairly powerful and robust set implementation, including differencing, intersection, and unification of sets. The sets use a string key for sorting the entries (and for deciding if they are the same) and an optional element that is declared as type(*) that can contain a reference to any object.
odbc2.sml  SIMPOL language support library for working with the ODBC client support.
pad.smlX Implements the PAD() function for compatibility with SBL. It can also be used in general in SIMPOL, since there is no equivalent.
printformlib.smlX Contains types and functions that support printing forms to the print architecture used in SIMPOL. Also implements a function for printing a record from a database.
quickreportlib.sml  Provides an easy to use fully functional report engine with grouping, sorting, and aggregate values at both group and report level. Reports are limited in the way they can look. For a more complex and flexible report engine, see the graphicreportlib.sml.
random.smlX The pseudo-random number generation provided by this library is quite useful. It uses a standard algorithm for generating pseudo-random numbers. If the seed is repeated, then the sequence will be the same each time. If a different sequence is desired, then the current date and time can be passed as the seed. The numbers generated are between 0 and 1, so any multiplier can be used to get the values and ranges desired.
registrylib.smlX The Windows registry is commonly used for storing configuration data on Windows. This library can be used to access the registry. Please be aware that user programs cannot write to the HKEY_LOCAL_MACHINE key on Windows Vista and later, these writes will be virtualized.
reorglib.sml  The functionality needed to reorganize a database container, or just individual tables within the container, including support for the system tables provided by the db1util.sml library, are located in this library.
replace.smlX This is a standard string replace function. It has been fairly thoroughly tested and should be able to handle situations that many string replace functions fail on, such as the replacement string or the search string being a substring of the other.
reportlib.sml  This library provides the core report1 type family that can be used to create custom report types. It is also embedded into the graphicreportlib.sml and the quickreportlib.sml libraries, each of which provide a specific style of report engine.
rsalib.smlX Provides a usable library for encrypting and decrypting as well as generating public and private keys.
sbislib.smlX This library supplies functions that are intended to ease the conversion of systems written for the Superbase Internet Server suite for the older Superbase product.
sbldatelib.smlX Implements the DATESTR(), DAY(), DAYS(), DAYSTR(), MONTH(), MONTHSTR(), and YEAR() functions for compatibility with SBL. Some of them can also be used in general in SIMPOL, since in many cases there is no equivalent. This library also includes a string2date() function.
sblexten.smlX This library is a nearly 1:1 conversion of the Superbase library of the same name and supplies a group of useful functions, some implemented multiple times, one for each supported datatype, such as Floor(), round(), Between(), Average, and others.
sbllib.smlX This library consolidates all of the SBL-specific libraries together with a number of the FN functions, such as: FN_Ext(), FN_Root(), FN_Alpha(), FN_Dec(), etc.
sbllocaledateinfo.smlX This library provides the SBLlocaledateinfo type that is required by many of the SBL date functions. This type holds the locale information such as the names of the days of the week, the months, and the month abbreviations, plus the value for the century base for interpreting 2-digit years.
sbltimelib.smlX Implements the TIMESTR() and TIMEVAL() functions for compatibility with SBL. Both of these can also be used in general in SIMPOL, since in many cases there is no equivalent, although see also the smtpdatelib.sml. This library also includes a string2time() function.
sbnglib.smlX Implements some commonly used types, such as datasourceinfo, tbinfo, and wxformoptiongroup to provide group management of option buttons.
sendkeys.sml  Contains a SENDKEYS implementation that works well in Win32, including the ability to send keystrokes to a window and not just commands. Win32-only.
sendmail.smlX Provides an easy-to-use sendmail() that makes use of the smtpclientlib.sml and smtpdatelib.sml libraries to send simple text messages.
serialize.smlX Contains the functionality to serialize even fairly complex objects to a file such that the state of the object can be retrieved later. Obviously cannot support properties that represent data types that cannot be instantiated with the .new() method.
shellexecute.smlX Supplies a wrapper for the Win32 ShellExecute() API call, which not only will run programs, but can also be used to start the registered program for a specific file type based on its file extension, such as starting the default browser for files ending in htm.
simpolpacker.smlX Implements an archiving system that utilizes the BZip2 compression support from the bzip2.sml library, which provides single file compression.
smtpclientlib.smlX Provides basic SMTP email sending capabilities. This is a work in progress. The library does not currently support MIME, attachments, HTML email, etc. It works fine for sending straight text messages to one or more addresses.
smtpdatelib.smlX Provides an SMTP compliant function for creating a date string from a datetime object.
sortlib.smlX Provides various sorting algorithm implementations, including Insertion Sort, Quicksort (recursive), a combination of Quicksort and Insertion Sort (even faster than Quicksort alone), and others.
soundlib.smlX Basic sound support that currently only supports the Windows operating system.
sql1.sml  A query engine implementation including query optimizer.
str.smlX Implements the STR() function for compatibility with SBL. It can also be used in general in SIMPOL, since there is no equivalent. The only thing not supported is scientific notation.
stringlib.smlX Contains various string parsing and manipulation functions. This library is heavily used in the more complex libraries. Some of the functions included are: parsetoken(), ltrim(), rtrim(), multiinstr(), formatlinebreaks(), etc.
timer.smlX This is a very basic but usable implementation of a timer object. Use the timer to run things that need to happen regularly independent of the rest of program execution. Each timer runs in a separate thread.
trim.smlX Implements the TRIM() function for compatibility with SBL. For a more flexible implementation see the rtrim() function in the stringlib.sml library.
uisyshelp.smlX Contains functions and types useful in working with the user interface and the operating system, such as retrieving the list of system colors, the default font, display size, etc. More details on this can be found in: the section called “Dialogs Using Standard Buttons”.
unittest.smlX A basic regression testing library that implements types for running regression tests and which compare the result of each test with the expected result and report only on failure.
urlendecode.smlX Provides functions for URL-encoding and URL-decoding. This is primarily used by web applications or programs that need to speak to a web server.
urllib.smlX Implements a type and function for parsing a string into a URL that has been divided into its component parts.
utf8lib.smlX Provides functions for converting to and from UTF-8 format.
uuencode.smlX Provides functions for uuencoding and uudecoding. It also has functions for doing base64 encoding and decoding. These are used by email systems for sending attachments in 7-bit characters.
val.smlX Implements the VAL() function for compatibility with SBL. It can also be used in general in SIMPOL, since there is no direct equivalent. The only thing not supported is scientific notation.
volatable.sml  Provides an complete implementation of volatile database tables, including table creation, record creation, storage, deletion and modification, locking, indexes, etc. Works in virtually exactly the same manner as the sbme1 type but does not support the member operator. Written completely in SIMPOL. The speed is not blinding, but pefectly adequate when working with 1000 or so records with a few indexes per table. Performance should be tested for anything outside of these parameters.
winfiledlg.smlX Library for calling the open and save file common dialogs from another program, such as the older Superbase product. This will only work on a Windows NT-based operating system when called from a Win16 program such as classic Superbase. See the example program in the samples\sbl directory.
xmllib.smlX Provides a few useful functions when working with XML but not using the facilities of the Document Object Model that the libxml.sml library provides.