Page 1 of 1

Neither QL nor FORTH

Posted: Tue Jul 21, 2020 3:28 pm
by polka
Hi all !
This is not about FORTH nor about QL. As I got back from my Alp confinement, I could play again with my other (old ) computers here, especially two of them still under Windows XP.

There, I used other development tools since the early 90's, which I found as interesting as FORTH. Niklaus Wirth gave birth successively to ALGOL 60, PASCAL, MODULA, and after that to a serie of "frameworks" : OBERON, OBERON-2, OBERON-3 and finally "Component Pascal".

I played a lot with Oberon and Oberon-2 and here I show how I ported my FORTH perspective algorithms to an "auto-stereography" program under Oberon-2 ; auto-stereographic images let see 3D shapes emerging from random dots or periodic pavements.

Herewith, an auto-stereoscopic bitmap of my 3D avion,
AVION auto-stereogram
(92.04 KiB) Downloaded 24 times

and a doc explaining the modular strucure of the program.
modules of STEREOGRAM
(373.14 KiB) Downloaded 14 times

For those eventually interested, Oberon is a rather specific framework*, that you will have to install first to be able to download and use source files (and it has also a very specific "print" resource delivering only "postscript" files : Adobe before PDF ! ).

* because it's kind of a full screen emulation of the CERES workstation, hardware developped at ETHZ especially for it.
CERES emulation
(15.73 KiB) Downloaded 16 times


Re: Neither QL nor FORTH

Posted: Wed Jul 22, 2020 5:45 am
by stevepoole
Hi Polka,

What is 'Component Pascal', and how does it differ from Pascal ?


Re: Neither QL nor FORTH

Posted: Wed Jul 22, 2020 8:22 am
by polka
Component Pascal is the last langage of the lineage of Niklaus Wirth (starting with ALGOL).

Start looking here :,en-us

Component Pascal is a general-purpose language in the tradition of Pascal, Modula-2, and Oberon. Its most important features are block structure, modularity, separate compilation, static typing with strong type checking (also across module boundaries), type extension with methods, dynamic loading of modules, and garbage collection.
Type extension makes Component Pascal an object-oriented language. An object is a variable of an abstract data type consisting of private data (its state) and procedures that operate on this data. Abstract data types are declared as extensible records. Component Pascal covers most terms of object-oriented languages by the established vocabulary of imperative languages in order to minimize the number of notions for similar concepts.

It is the langage of a framework called "Black Box" very similar in its spirit to JAVA.

Component Pascal is to Pascal what Java is to C and C++: a modern and safe next-generation language that combines the flexibility of dynamic languages with the robustness of static languages. Like Java, it builds on decades of experience, and makes reuse of existing skills easy. Like Java, it supports component software much better than its predecessors. Compared to Java, it is easier to learn and allows to produce more efficient code.

The most obvious difference is the "look and feel" of the two languages. Component Pascal is syntactically clearly in the Pascal family, while Java is in the C family. But this is a relatively superficial difference.

Concerning the more important "design for safety", Java and Component Pascal are closely related, while C and even original Pascal (e.g., untagged variant records) are comparatively unsafe. Among other things, safety also implies automatic garbage collection. Garbage collection is necessary to avoid memory leaks and, more importantly, dangling pointers. Both Java and Component Pascal support the dynamic loading of code and metaprogramming (reflection). As a result, both languages can use virtually the same run-time system. This is proven by the real-time operating system JBed ( and a Component Pascal compiler that produces standard Java byte code class files. Note that C or C++ could not be translated into Java byte code, due to their inherent lack of safety. In this fundamental respect, Component Pascal and Java are closer than Java is to C++!

I could not say better !


Re: Neither QL nor FORTH

Posted: Wed Jul 22, 2020 2:05 pm
by polka
Here a little program to show what a Component Pascal source looks like :
source and graphic interface of Racine
(144.63 KiB) Downloaded 18 times

This program demonstrate the square root operation (algorithm) formerly taught at school ; the zip file contains the Component Pascal source and a picture of the graphic interface, that a Black Box tool let compose and associate to some procedures (those exported : marqued with a * and without parameters -> commands in the Oberon parlance).

Re: Neither QL nor FORTH

Posted: Wed Jul 22, 2020 2:43 pm
by NormanDunbar
I had a quick look at Component Pascal. It seems to be like Borland Delphi? I'm assuming the name, Component, is because you can build forms by dropping components onto it a la Visual Basic/Delphi etc. I used to like Borland Delphi but now I'm permanently on Linux, I don;t do much Pascal programming. I could install Lazarus and Free Pascal, I suppose. I tend to use Qt or occasionally, wxWidgets these days.

CP looks to be Windows 32 bit only as well, according to BlackBox Framework's web site.


Re: Neither QL nor FORTH

Posted: Thu Jul 30, 2020 2:35 pm
by polka
Actually, the Oberon kind of Pascal was the langage used for developping the runtime/framework environment (and applications) for CERES, a graphic workstation that was designed (in 1985!) at ETHZ by a team led by Niklaus Wirth for educationnal purposes. Shortly after that, this framework was ported on PCs under DOS2/Windows 3.1. In this form, it is a kind of full screen emulation of a CERES workstation, a bit like Qemulator is an emulation of the QL. But the langage itself cannot be said 32 bit, it has basic types some of which can be 64 bits (depending of the target machines of the emulation - because there were also several other targets).

And Component Pascal, which is actually a slight evolution of Oberon was also ported on a big lot of other hardware : to be noted, a real time framework called Jbed, that could use Component Pascal and Java to produce Java Byte Code for any platform hosting a JVM ; and the applications would be "real time" not in the sense of "preemption & priority manipulations" but in the sense of "earliest deadline first" - much more convenient when a lot of "objects" are fighting for computing resources.