<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Dave<div><br></div><div>I was only refering to Oberon-07. The semantic in previous Oberons (and Oberon dialects) was different than Oberon-07.</div><div><br></div><div>I find the implemented semantic of hex values in the Oberon-07 compiler cleaner.</div><div><br></div><div>In Oberon-07, you can write</div><div> b := 0FFFFFFFFFFFFH;</div><div> i := 0FFFFFFFFFFFFH;</div><div><br></div><div>the results are: b = 255 and i = -1.</div><div><br></div><div>Jörg</div><div><blockquote type="cite"><div dir="ltr">
<p><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;">MODULE Test; IMPORT Out;</span></p>
<p><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;">PROCEDURE Do*;</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;">VAR b: BYTE; s: SHORTINT; i: INTEGER; l: LONGINT;</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;">BEGIN</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> i := 0FFFFFFFFH; Out.String("i := 0FFFFFFFFH: "); Out.Int(i,1); Out.Ln;</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> l := 0FFFFFFFFH; Out.String("l := 0FFFFFFFFH: "); Out.Int(l,1); Out.Ln;</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> l := 0FFFFFFFFL; Out.String("l := 0FFFFFFFFL: "); Out.Int(l,1); Out.Ln;</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> l := 0FFFFFFFFFFFFFFFFL; Out.String("l := 0FFFFFFFFFFFFFFFFL: "); Out.Int(l,1); Out.Ln;</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> (* The following all fail to compile with 'number too large': </span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> b := 0FFH;</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> s := 0FFFFH;</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> i := 0FFFFFFFFL;</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> l := 0FFFFFFFFFFFFFFFFH;</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> *)</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;">END Do;</span></p>
<p><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;">END Test.</span></p>
<p>With results:</p>
<p><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> i := 0FFFFFFFFH: -1</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> l := 0FFFFFFFFH: -1</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> l := 0FFFFFFFFL: 4294967295</span><br><span style="font-family: 'courier new', courier, monospace; font-size: 10pt;"> l := 0FFFFFFFFFFFFFFFFL: -1</span></p>
<p>So I understand the H/L suffix enables the use of hex bit patterns for 32 and 64 bit integers, but does not address the issue for 8 or 16 bit integers.</p>
<p>Do you know if there is any way to enable e.g. FF for bytes, or FFFF for shortints? Or whether this was considered?</p>
<p>Thanks --</p></div></blockquote></div></body></html>