Component Pascal Collection

Helmut Zinn


By Gérard Meunier

Non-linear data modelling by the simplex method.

This program tries to fit a model to a set of data by searching the least squared difference curve. The minimization is obtained by the so-called "simplex algorithm".

Datafit doesn't use any other CPC services.

StdCoded File <=> PacCoded File (92 / 41 kByte - Release 24-Aug-2005)


By Stewart Greenhill

HTTP Client and Server Utilities.

Subsystem Dbu is a collection of modules for creating HTTP servers and clients. It provides low-level buffering of network streams, allowing ASCII files to be easily sent and retrieved via a TCP/IP channels.

An unusual feature of the HTTP server implementation is that a single server can function both as origin server and proxy server. I developed this design to allow me to experiment with dynamic document rewriting. An intelligent proxy can dynamically create content as the user explores the web and merge this content with external HTML documents "on-the-fly" as they are retreived.

Note that this is not a "quality" release, as I haven't had time to properly structure and document many functions. This code has served its purpose and will not be developed further (by me, anyway). However, the server functions are reasonably modular. New facilities can be added fairly easily by implementing HTTP.Handlers and HTTP.Filters. See Dbu/Docu/Manual for more details.

Dbu uses the services provided by CommTCPAsync.

StdCoded File <=> PacCoded File (107 / 49 kByte - Release 21-Sep-2007)


By Robert D. Campbell

Sample programs of using the Chill group.

A collection of demonstrations ranging from the very simple (Hello World), through the practical (TinySine & Rose demonstrate simple uses of the module LibPlotters) to the sophisticated.

Donald Knuth has a very flexible (abstract) problem solving algorithm, called "Dancing Links" or "DLX". This is implemented with examples that include an efficient Sudoku solver and a Polyomino placement solver.

The use of "Turtle graphics" (called Gerbil graphics here!) to create recursively designed curves, such as Dragon curves is also demonstrated.

The most sophisticated example is a mapping tool, with many options, that can download worldwide maps in many formats such as Open Street Map or Open Cycle Map, and manage Tracks and Routes in gpx format compatible with many external GPS devices.

Demo uses the services provided by Ctls and Lib.

StdCoded File <=> PacCoded File (753 / 324 kByte - Release 24-Apr-2017 - Chill 12)


By Fyodor Tkachov and Helmut Zinn

Persistent Desktop.

This subsystem adds a little bit of persistence to the BlackBox desktop. It allows you to save and restore the documents open on your desktop, and some state information about them (such as their window positions). The desktop information is stored in desktop files, it is therefore possible to maintain a series of desktop files. If you leave BlackBox the current desktop file is automatically stored and reloaded once you restart BlackBox. Most importantly, the windows now remember selections and what is shown in each window. The ordering of windows is now also preserved.

Desktop doesn't use any other CPC services.

StdCoded File <=> PacCoded File (41 / 19 kByte - Release 25-Sep-2016)


By Marc Frei and Bernhard Treutwein

Oberon Conversion Tool.

For ease of porting and to simplify the migration from Oberon to Component Pascal, this conversion tool is provided which automates much of the necessary conversion process. The converter translates Oberon/L source code (which is assumed to be syntactically correct) into Component Pascal source code. Changes are marked.

Oberon/L was the marginally changed version of Oberon-2 which was used in Oberon/F which in turn was the previous name of BlackBox. The translator should work with standard Oberon and Oberon-2 source code. Active Oberon will need some manual intervention before it can be translated correctly.

This module stems from BlackBox version 1.3x and is usable with the current version of BlackBox. Kudos to Marc Frei of Oberon Microsystems for digging out and providing this source.

DevCPConv doesn't use any other CPC services.

StdCoded File <=> PacCoded File (86 / 35 kByte - Release 21-Mar-2017)


By Ivan Denisov

2D diagrams plotting.

DiaPlot allows to plot 2D graphs with unlimeted number of curves, to make animated graphs, to export graphs to "csv" and "mpl" formats.

DiaPlot uses the services provided by CpcUtf8Conv.

StdCoded File <=> PacCoded File (103 / 48 kByte - Release 18-Aug-2016)


By Helmut Zinn

An Update Program.

Subsystem Dos contains several tools which I use for

The most importend tools is an update program for data replications. I implement the replication in two steps: compare & update. The first step compares two directory trees and list all difference in a document. You can proof this list and edit it. Based on this document, the second step run through that list and copy the new and changed files. Old files, which doesn't exist in the source, are deleted in the destination.

Another program can compare two version of BlackBox and create a document of differences including links to the old and the new files.

For software testing I need a procedure which compares 2 files line by line. You find such kind of comparison inside this subsystem. DosDiffFiles are my basic modules for the test harness. I need them during the software development and maintenance. I use them for testing of my programs with test pattern and proofing the program result automatically.

Further there are programs for time messurement, calculating MD5 and SHA-256 checksums.

Dos uses the services provided by Pac and Ctls.

StdCoded File <=> PacCoded File (274 / 125 kByte - Release 15-May-2022)


By Elena Shamardina and Ilya E. Ermakov

Game "Dots" (Точки).

Dots Game is a strategy game that is similar to the game Go. It is very popular in Russian. The rules of Dots can be found on Wikipedia. Dots is played by two or more players either locally on a single computer or over a network. An observer can also join the game with his own computer. The game board including its score can be saved as an odc file and you can reload it to continue playing later. In addition, it is possible to create a history list of the moves you have made and to replay the list step by step.

This subsystem has been translated from Russian to English by Helmut Zinn. The original Russian version can be downloaded at

Dots doesn't use any other CPC services.

StdCoded File <=> PacCoded File (121 / 53 kByte - Release 25-Nov-2023)


By Brett S. Hallett

Developing Programs with BlackBox Oberon and MySql.

This is my collection of notes, example code, etc... I created to "fill in" the gaps not explained by the standard documentation supplied with Blackbox Oberon on how to actually write useful programs.

The book is approximately 160 pages and is not complete. But still useful !!

It covers Installing, Setup and Interfacing to MySQL in depth, writing report programs (including a complete SQL report generator), writing complete GUI/MySQL systems, etc... It does not cover the more esoteric usage of the language, because I have'nt the need to be bothered to work them out. I make no attempt to cover the complete BlackBox Oberon Language.

Blackbox Oberon is a very powerful programming tool and well worth consideration. But I should also advise you that while I really like Blackbox Oberon I have found it lacks certain features that I need for commercial database programming development.

For more information read my manuscript in PDF format (1.8 MByte). The same documentation is also in the BlackBox StdCoded File. You find it at 'Draconcity/Docu/DevelopingInBlackbox.odc'. You'll find further information about MySQL at

Dragoncity doesn't use any other CPC services.

StdCoded File <=> PacCoded File (333 / 140 kByte - Release 30-Sep-2003)


By Mary Kynn

Distributions for a logistic regression model.

The program, Elicitor, is for the elicitation of expert prior distributions for a logistic regression model, which I was extending to generalised linear models. The hooks are there but only a couple of alternatives were actually written. The controls are fairly intricately considered as the psychological components of eliciting distributions was a big part of my work. This may make the program overly complex. Of course I'm willing to correspond to anyone who wants to take on what I started.

Elicitor doesn't use any other CPC services. I recomment to use Elicitor together with Logit and Probability.

StdCoded File <=> PacCoded File (1829 / 687 kByte - Release 7-Feb-2010)


By Fyodor Tkachov

Efficient Programming for Sciences and Engineering in the 21st Century.

This package of software helps novices (physicists) to start programming in Blackbox. It is the result of a would-be project "Efficient Programming for Sciences and Engineering in the 21st Century" which was discussed last summer, and whose first visible result is the Oberon Day 2004. I plan to add more examples there in future.

Epse21 uses the services provided by Ctls, Lib, Babel, Util, Plot and Datafit.

StdCoded File <=> PacCoded File (1.357 / 245 kByte - Release 21-Aug-2017)


By Gérard Meunier and Robert D. Campbell

Escher constraint-drawing editor.

A constraint-drawing editor allows the user to maintain a set of Points and Figures on the drawing plane. Points come in two flavours: Free Points and Constrained Points. While the former can be freely placed and moved by the user, the latter depend on other Points, which will (fully or partially) define the position of a Constrained Point. If necessary, the system will move Constrained Points automatically to maintain the respective constraints. Examples of Constrained Points are points located in the middle of two given ones, on a corner of a rectangle, or anywhere on a circle.

Escher is a reworking of the original 'Constraint Drawing' package Brahe published by Joakim Björklund, Niclas Forsen, Gabor Magyar, Peter Mitts, and Wolfgang Weck 1997.

Escher uses the original constraint drawing concept and implementation from Brahe virtually unchanged, but with the following differences:

  1. The underlying data type has been changed from INTEGER to REAL.
  2. Several new Point and Figure types have been added.
  3. The user interface code has been extensively rewritten to provide new and improved functionality.
  4. Multi-language support has been added to the user interface (English, French & German).
  5. A few old bugs have been removed; no doubt some new ones have been added!
  6. The Documentation has been significantly extended & updated to reflect the above changes.
  7. A Module that adds Animation to Escher drawings.
  8. Support for drawing conic sections (ellipses and parabolas etc).

The dependancies Escher has on non-Oms subsystems are:

Escher uses optional the services of Ctls.

StdCoded File <=> PacCoded File (1047 / 446 kByte - Release 5-Feb-2015)


By Robert D. Campbell

Digital and other filter design and analysis.

Filter provides extensive support for designing and using digital FIRs (Finite Impulse Response filters), for DFTs (Discrete Fourier Transforms), many fast algorithms (FFTs) for implementing them, and many fast functions that exploit them (such as convolutions).

A range of analogue filters are also supported, as are both Fourier Series and (analogue) Fourier Transforms.

The FFT algorithms are written with an emphasis on accuracy; important when they are used by the Multi subsystem for fast multi-million digit arithmetic.

Filter uses the services provided by Algebra, Ctls, Lib and Multi.

StdCoded File <=> PacCoded File (2.295 / 685 kByte - Release 24-Apr-2017 - Chill 12)


By Robert D. Campbell

An abstract hierarchical Specification framework.

Frame implements two major capabilities:

Frame uses the services provided by Ctls and Lib.

StdCoded File <=> PacCoded File (297 / 122 kByte - Release 2-Jun-2017 - Chill 12)


By Necati Ecevit

Loading, displaying and saving popular graphics image formats.

This subsystem contains Component Pascal wrapper for FreeImage.dll (v3.17.0).

What is FreeImage?
FreeImage is an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications. FreeImage is easy to use, fast, multithreading safe, compatible with all 32-bit versions of Windows, and cross-platform (works both with Linux and Mac OS X). For more information about FreeImage look at

FreeImage doesn't use any other CPC services.

StdCoded File <=> PacCoded File (6339 / 2889 kByte - Release 29-Nov-2016)


By Douglas G. Danforth

Sound Recording and Playing.

Module GftAudio provides basic sound handling capability based on Microsoft's Multimedia libraries (WinMM). Recording and playing of 8bit or 16bit data is provided in mono or stereo form. Your sound card determines whether it supports all of the formats specified by GftAudio.

GftAudio doesn't use any other CPC services.

StdCoded File <=> PacCoded File (38 / 17 kByte - Release 16-Jun-2005)


By Douglas G. Danforth

Inserting special characters into text files.

Module GftGlyphs inserts special characters into text files by clicking on a palette of symbols. The carat in the target text window is maintained when clicking on the palette so that one can "type, click, type" without having to reposition the carat.

This release includes the font file Gft.ttf with special mathematical symbols included. See the documentation for what symbols are supported.

GtfGlyphs doesn't use any other CPC services.

StdCoded File <=> PacCoded File (477 / 244 kByte - Release 27-Oct-2011)


By Douglas G. Danforth

BlackBox Messages Notification.

GftMessages provides notification of (almost all) BlackBox messages using the StdLog by use of WITH to determine which message has been passed to a handler routine. If there are some messages that I have missed then please let me know. The name of the message is written to the log but any fields of the message are not. This is a great way to see what messages are being sent to your views.

GftMessages doesn't use any other CPC services.

StdCoded File <=> PacCoded File (10 / 5 kByte - Release 24-Oct-2011)


By Douglas G. Danforth

File Searching.

GftSearch allows multiple strings to be searched simultaneously. Arbitrary directories and files can be searched.

For example one can search for the following 3 strings simultaneously:
   call back
   procedure variable

OR    specifies that any of the entered strings found in a file will trigger a report.
AND  specifies that all of the entered strings must be in a file to trigger a report.

The search mechanism builds a finite state machine that simultaneously looks for all strings sought (there can be hundreds of them). Search time is independent of the number of strings sought and is a linear function of the length of file searched. The core GftSearch can be embedded in a large number of applications since the user determines from whence the bytes comes and how to handle pattern matching when it occurs (See GftSearchFile for example).

The routine is very fast and examines each byte in a file only once. The routine is based on XSearch developed by Scott Daniels and Pentti Kanerva in the 1970s.

Compared to BlackBox 'Search' it is about 5 times faster (this must be qualified since the first time 'Docu' is searched both techniques yeild similar times. It is the second and subsequent times that Docu is seached that the speedup occurs. I believe this has nothing to do with search initialization but rather with Blackbox or Microsoft's dirctory allocation scheme).

GtfSearch doesn't use any other CPC services.

StdCoded File <=> PacCoded File (213 / 46 kByte - Release 8-August-2016)


By Douglas G. Danforth

Keyboard & Mouse Wrapper.

An arbitrary view can be wrapped (and unwrapped) such that keyboard and mouse events can be handled by the view. When a mouse key is held down, the wrapper does not block other BlackBox processes (e.g. Clock).

GtfWrappers doesn't use any other CPC services.

StdCoded File <=> PacCoded File (24 / 11 kByte - Release 8-Feb-2008)


By Gérard Meunier


This software calculates the succession of operations from six integer data to an integer result. You can compete with friends to find who will guess the solution first.

Good uses the services provided by Babel and Util.

StdCoded File <=> PacCoded File (42 / 20 kByte - Release 9-Feb-2003)


By Wojtek Skulskii

Data Acquisition and Monitoring Toolbox.

BlackBox/Gr (Gr in short) is a toolbox of histogramming and graphical modules to support developing interactive data acquisition (DAQ) and monitoring programs. Such programs can be used to collect and display data from laboratory equipment (e.g., voltmeters), the DAQ modules (e.g., CAMAC modules), and various sensors and probes (e.g., temperature probes, Hall effect probes, etc.). You find slides and further information at

Gr doesn't use any other CPC services.

StdCoded File <=> PacCoded File (779 / 358 kByte - Release 6-Apr-2005)


By Werner Bossert

Han Numbers - 中文数字

The traditional Chinese numerals are used in the East Asian cultural sphere, in Greater China, in Japan, in Korea and in Vietnam and is one of the written numeral systems. They are based on Chinese characters (Hànzì) that correspond to numerals in the spoken language. Large numbers follow the Chinese tradition of grouping by 10,000.

There are two sets of characters for Chinese numerals: one for everyday writing and one for use in commercial or financial contexts. Negative numbers are formed by adding (负, 負) before the Han number.

Han uses the services provided by Ctls and UnicodeMappings.

StdCoded File <=> PacCoded File (62 / 30 kByte - Release 3-Aug-2023)


By Gérard Meunier

Scientific Spreadsheet.

Hermes is a tool for making complex calculations and 2D plotting. It can handle and combine real functions, set of measured values, operations like derivations, integrations, fast Fourier transform, data modeling, etc... It has a general interface for data acquisition systems and can acquire data, make simple calculations on them and plot the result in real time. A data simulator and a Fourier synthesizer are included.

Hermes is used every day for physics teaching.

For the moment, all the user interface and its documentation are in French, even if all is ready for their translation (but time is not extendable...). The documentation may not be up to date everywhere, for Hermes is changing every day. You can get the most recent version of Hermes at http:\\

Hermes uses the services provided by Babel, CpcFloat, Ctls, Util and optional the services of CpcBitmaps, Escher and Pac.

StdCoded File <=> PacCoded File (1180 / 522 kByte - Release 5-Jun-2007)


By Helmut Zinn

Html Importer and Exporter.

You can translate BlackBox documents to html files and wise versa. All tags that are not translated are in a tag view. The tag views can be created, expanded, collapsed, shown and hidden.

Html uses the services provided by Ctls and Pac.

StdCoded File <=> PacCoded File (399 / 223 kByte - Release 3-Jan-2020)


By Josef Templ


The subsystem Http provides a minimal and safe subset of an HTTP/1.1 server running as a background action. It is minimal and safe in the sense that it does not handle any http request itself but delegates all requests to so-called servlets. The server only handles the http protocol, i.e. it listens on a local address, accepts connections, reads from and writes to a connection, and eventually closes a connection. The server is non-blocking.

   The http server can be run with any protocol driver that provides CommStreams listeners. This includes CommTCP for running the server unencrypted over plain TCP/IP connections and HttpCommSSL for running as an https server over an SSL/TLS encrypted TCP/IP connection. The latter case requires additional openssl libraries, certificate and key files, and a basic understanding of SSL/TLS. For details please refer to the openssl documentation.

   A servlet is registered for a particular prefix of the server's name space. It is the task of the servlet implementation to handle http requests directed to the name space part that is covered by the servlet. The implementation of a servlet may itself be inverted, i.e. it may be split into a sequence of continuations until a response is delivered. This enables long-running servlet implementations to be split into smaller pieces and allows for intertwined handling of multiple requests.

   The design of the http server lends itself for implementing so-called REST APIs based on Component Pascal. By implementing and registering a servlet an application specific REST API can be easily provided without the complexities, safety issues, and interfacing problems of a full blown web server.

   The http server itself does not introduce anything like a session state because http is a state-less protocol. However, sessions can be created easily by means of so-called cookies, which can be set and get via header fields. A session is a server side data structure identified by a unique id, e.g. a sequential number or a GUID. This id can be sent to the client upon creation of the session via a Set-Cookie response header field (rfc 6265). The Client will then add a Cookie request header field with the same content, viz. the session id, with future requests to the same site.

There is currently no support for named virtual hosts.
Currently supported URI formats: Request URIs are expected to be percent-encoded according to rfc 3986. The query part of a GET URI or a POST message content expects the content type application/x-www-form-urlencoded. Utf-8 is used as the character set.

Currently supported content encodings: There are no encodings other then the 'identity' encoding, i.e. no gzip or compress.

Two servlets are provided together with the http server:
- A SentinelServlet is registered for the empty name space prefix, i.e. it matches any request that is not handled by another servlet. Its task is to report an error message for any unhandled request.
- An EchoServlet is provided for testing and debugging purposes. Its task is to return the http request as its html result. This allows for inspection of http requests, in particular of the requested URI and the provided header fields and query parameters. The echo servlet is not registered by default.

An additional servlet (HttpWeb.Servlet) is provided for serving files located in a specified root folder. This servlet, although quite simple, turns an http server into a more traditional web server. For specifying a favorite web icon for your site another servlet (HttpWeb.FaviconServlet) is provided.

Http doesn't use any other CPC services.

StdCoded File <=> PacCoded File (1956 / 903 kByte - Release 6-Dec-2018)


Introduction | Subsystems | Topics | Authors | Date | Links | FAQ | Downloads
A..C | D..H | I..N | O..S | T..Z

Last Updated 25th November 2023