<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 12pt; font-family: Verdana,Geneva,sans-serif'>
<p>I think there are a couple of conversations going on here, I'm trying to get straight what's being discussed.</p>
<p>Arthur's original question was about passing 90909090H as a literal to a 32 bit INTEGER parameter, he found that Oberon 2013 supported it and VOC didn't.</p>
<p>I chimed in because I had tried to support this in VOC but had not been able to. My response was an attempt to explain why VOC could not support it but I suspect I just confused the matter.</p>
<p>VOC is an Oberon 2 compiler including support for SHORTINT, INTEGER and LONGINT, and for size conversions SHORT() and LONG(), and applies type compatibility rules as per the OBERON 2 language report.</p>
<p>This is in contrast to the Oberon 2007/2013/2016 language which has a single integer size. (While it also has BYTE, it does not have the size compatibility rules of Oberon 2, nor does it have SHORT() and LONG(). This makes it a lot simpler.)</p>
<p>I think I am seeing some level of consensus that having a single INTEGER size has benefits.</p>
<p>(Aside - I worked a lot with the original CDC 6000 Pascal which had a single integer size of 60 bits. It worked vary well, I miss it. All arithmetic was done on 60 bit values. Additionally Pascal supported subrange types - these did not affect arithmetic, but they did<br /> 1) support compile time range and run time value checking<br /> 2) affect storage size - only when used in packed records.<br />)</p>
<p>I think the answer to Arthur's original question depends on whether his goal is a single integer size compiler, or whether there is an intent to add support for e.g. Oberon 2's SHORTINT and LONGINT.</p>
<p>The crux of the issue from my point of view is that supporting 90909090H as a 32 bit integer parameter is easy for a compiler like Oberon 2013 that supports a single INTEGER size, and not easy, or not possible for a compiler that supports OBERON 2's multiple integer sizes. (Component Pascal has the H vs L suffix workaround for 64 bit and 32 bit integers, but does not provide similar solutions for 16 or 8 bit integers.)</p>
<p>-- Dave.</p>
<p><br /></p>
<p>On 2020-04-27 00:55, Chris Burrows wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored --><!-- meta ignored -->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;">It is useful that Blackbox reports those compilation errors; it is less forgiving than many Oberon compilers. By not making assumptions it forces the programmer to really think about what he is trying to achieve. <!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;">As far as I know there are no specific literal constants defined in Component Pascal for BYTE or SHORTINT values. <!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;">If I were you I would implement two completely separate compilers. One that implements 32-bit INTEGERs and another that implements 64-bit INTEGERs and avoid mixing the two. In that way you can still conform to the Oberon Language report and not have to introduce any extensions. If you are concerned that a programmer might want to write code using the 64-bit compiler and then try to run it on the 32-bit compiler that is a problem for the programmer not you. <!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;">If the programmer is writing code that he wants to run on both systems then he should separate any parts that are sensitive to the size of INTEGER and include assertions in those parts such as:<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;">ASSERT(SYSTEM.SIZE(INTEGER) = 8)<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;">to prevent it from accidentally being compiled for, and run on, the wrong platform.<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;">Regards,<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;">Chris Burrows<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;">CFB Software<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;"><a href="https://www.astrobe.com" target="_blank" rel="noopener noreferrer">https://www.astrobe.com</a><!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d; mso-fareast-language: EN-US;"><!-- o ignored --> </span><a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" target="_blank" rel="noopener noreferrer">/lists.inf.ethz.ch/mailman/listinfo/oberon</a></p>
</div>
</blockquote>
</body></html>