Discussion:
LONGINT in Oberon07 ?
(too old to reply)
g***@gmail.com
2014-11-07 19:50:00 UTC
Permalink
The Oberon07 report does not mention LONGINT as a basic type.
The book of 2013, says "1. The data types LONGINT, SHORTINT, and LONGREAL have been discarded, and with them the concept of type inclusion."

However, on p32 one reads :
"PROCEDURE GetSelection (VAR text: Texts.Text; VAR beg, end, time: LONGINT)"

And LONGINT is indeed used at many places in the code.

So, what is the official truth ?

Thanks,

Georges
August Karlstrom
2014-11-08 11:06:14 UTC
Permalink
The Oberon07 report does not mention LONGINT as a basic type. The
book of 2013, says "1. The data types LONGINT, SHORTINT, and LONGREAL
have been discarded, and with them the concept of type inclusion."
What book is that?
Texts.Text; VAR beg, end, time: LONGINT)"
And LONGINT is indeed used at many places in the code.
So, what is the official truth ?
The official truth is that there is no LONGINT in Oberon-07/14.


-- August
g***@gmail.com
2014-11-08 14:14:59 UTC
Permalink
Post by August Karlstrom
The Oberon07 report does not mention LONGINT as a basic type. The
book of 2013, says "1. The data types LONGINT, SHORTINT, and LONGREAL
have been discarded, and with them the concept of type inclusion."
What book is that?
Texts.Text; VAR beg, end, time: LONGINT)"
And LONGINT is indeed used at many places in the code.
So, what is the official truth ?
The official truth is that there is no LONGINT in Oberon-07/14.
-- August
Well, the book is :
"Project Oberon
The Design of an Operating System,
a Compiler, and a Computer"
Revised Edition 2013
Niklaus Wirth
Jürg Gutknecht

available in pdf here : http://projectoberon.com/ or on Prof Wirth's home page.
With LONGINT used in that book, I wonder.
Georges
August Karlstrom
2014-11-08 14:54:11 UTC
Permalink
Post by g***@gmail.com
Post by August Karlstrom
The Oberon07 report does not mention LONGINT as a basic type. The
book of 2013, says "1. The data types LONGINT, SHORTINT, and LONGREAL
have been discarded, and with them the concept of type inclusion."
What book is that?
"Project Oberon
The Design of an Operating System,
a Compiler, and a Computer"
Revised Edition 2013
Niklaus Wirth
Jürg Gutknecht
available in pdf here : http://projectoberon.com/ or on Prof Wirth's home page.
With LONGINT used in that book, I wonder.
Georges
When the book was revised the authors probably forgot to replace LONGINT
with INTEGER in a few places. It may also be the case that Wirth's
compiler (as an extension) accepts LONGINT as a synonym for INTEGER in
order to be compatible with existing Oberon code. Note also that the
scale factor "D" is present in the grammar although the type LONGREAL
has been removed.


-- August
g***@gmail.com
2014-11-09 13:39:26 UTC
Permalink
...
Post by August Karlstrom
When the book was revised the authors probably forgot to replace LONGINT
with INTEGER in a few places. It may also be the case that Wirth's
compiler (as an extension) accepts LONGINT as a synonym for INTEGER in
order to be compatible with existing Oberon code. Note also that the
scale factor "D" is present in the grammar although the type LONGREAL
has been removed.
-- August
LONGINT appears in the source code, and not only in the book.

But I found this comment :
"LONGINT is synonym to INTEGER, LONGREAL to REAL."
in the code of compiler module ORB.

Georges
c***@gmail.com
2014-11-16 21:20:19 UTC
Permalink
Post by g***@gmail.com
LONGINT appears in the source code, and not only in the book.
"LONGINT is synonym to INTEGER, LONGREAL to REAL."
in the code of compiler module ORB.
The Project Oberon compiler has a few language extensions above and beyond those defined in the latest (2014) Oberon language report. LONGINT and LONGREAL aliases are two of them - presumably to make it simpler to port existing Oberon code. You can download a copy of the report from here:

http://www.inf.ethz.ch/personal/wirth/Oberon/index.html

You will notice that the range of numbers represented by INTEGER is not specified. The range is implementation-dependent so you should not make any assumptions about their size if you want to avoid problems.

Regards,
Chris Burrows
Astrobe: Oberon for ARM Cortex-M3 and Cortex-M4
http://www.astrobe.com

Loading...