(no subject)

From: [at]} <Hans>
Date: Sun, 1 Nov 1998 17:01:46 +0100

In newsgroup comp.lang.oberon in a thread on the support for 64-bit
integers in various languages Bernhard Treutwein wrote:

> BTW, the BlackBox / ComponentPascal version looks as follows
>
> MODULE TestTest;
>
> IMPORT O := Out, I := Integers;
>
> CONST
> long = MAX(LONGINT);
> lng1 = 9223372036854775807;
>
> PROCEDURE Do*;
> VAR s : ARRAY 80 OF CHAR;
> BEGIN
> O.Ln;
> I.ConvertToString(I.Long(long),s);
> O.String("long = "); O.String(s);
> O.Ln;
> I.ConvertToString(I.Long(lng1),s);
> O.String("lng1 = "); O.String(s);
> O.Ln
> END Do;
>
> END TestTest.Do
>
>
> long = 9223372036854775807
> lng1 = 9223372036854775807
>
>
> I did not find any other way to print out LONGINTs without using
> the arbitrary precision integer package.

This deficiency of BlackBox to output LONGINTs in a simple way appears
to be due to the fact that the interfaces of procedures Out.Int, In.Int
and StdLog.Int were changed in the conversion of Oberon/F to Component
Pascal. In their current version, using type INTEGER in stead of
LONGINT, they deny any input or output mechanism to values or variables
of Component Pascals 64-bit type LONGINT.


Also in this way they no longer are "Oakwood compliant", making it
impossible to provide simple examples using LONGINT in textbooks (e.g.
the Oberon version of Numerical Recipes by Press et al., which is being
developed at the moment) that can be used on Oberon and Component Pascal
systems as well.

It is not helpful that the Scanner and Formatter in module TextMappers
don't give support for type LONGINT either. In this way it is very
difficult to make ones own version of In and Out.

Was the change of the interfaces of the above mentioned procedures done
accidentally (by applying the Oberon/F -> Component Pascal conversion
tool a bit to rigorously)? Or is type LONGINT in Component Pascal
supposed to be used only as intermediate type in calculations?


Hans Klaver

(who advocates support for LONGINT I/O in Component Pascal)



This letter was cross-posted to comp.lang.oberon
Received on Sun Nov 01 1998 - 17:04:03 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:42 UTC