Re: [Oberon] Oberon Digest, Vol 172, Issue 7
I would say include the (). Does not matter to the compiler but reduces the cognitive load on the human reader. On Wed, Sep 12, 2018 at 6:00 AM, <oberon-request@lists.inf.ethz.ch> wrote:
Send Oberon mailing list submissions to oberon@lists.inf.ethz.ch
To subscribe or unsubscribe via the World Wide Web, visit https://lists.inf.ethz.ch/mailman/listinfo/oberon or, via email, send a message with subject or body 'help' to oberon-request@lists.inf.ethz.ch
You can reach the person managing the list at oberon-owner@lists.inf.ethz.ch
When replying, please edit your Subject line so it is more specific than "Re: Contents of Oberon digest..."
Today's Topics:
1. Good practice and style. (peter@easthope.ca)
----------------------------------------------------------------------
Message: 1 Date: Tue, 11 Sep 2018 11:03:34 -0700 From: peter@easthope.ca To: oberon@lists.inf.ethz.ch Subject: [Oberon] Good practice and style. Message-ID: <E1fzn0g-000064-2h@xo-53-1d-bb.localdomain>
Hi,
Reference https://en.m.wikibooks.org/w/index.php?title=User:PeterEasthope/sandbox& mobileaction=toggle_view_mobile#
MarkupOberon() is invoked exactly once in the module.
Two questions.
(1) If language syntax doesn't require parentheses after a procedure name when there are no parameters, which is better: include empty parentheses or omit? (Many relevant instances in the cited module.)
(2) Since MarkupOberon is invoked only once, which is better: keep as is or incorporate in-line where invoked? (If MarkupOberon is included in-line, MarkupT will become much bigger with deeper indentations.)
Thanks, ... Lyall E.
-- Message composed and transmitted by software designed to avoid the need, overhead and vulnerability of antivirus software.
123456789 123456789 123456789 123456789 123456789 123456789 123456789 Tel: +1 360 639 0202 http://easthope.ca/Peter.html Bcc: peter at easthope. ca
------------------------------
Subject: Digest Footer
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
------------------------------
End of Oberon Digest, Vol 172, Issue 7 **************************************
Is there a simple way with ETHOberon (System 3 on Windows) to display a large integer matrix (e.g. 1000 * 1000) as a raster image on screen? Thanks and regards, Dieter
Dieter Before trying to give a possible solution, I have some questions: - What is the range of values of your integers? 0..2^8, 0..2^16, 0..2^24, 0..2^32 - What do you expect to be displayed on screen? - How big is your screen? - How many colors do you have? br Jörg
Am 12.09.2018 um 16:43 schrieb Dieter <d.gloetzel@web.de>:
Is there a simple way with ETHOberon (System 3 on Windows) to display a large integer matrix (e.g. 1000 * 1000) as a raster image on screen?
Thanks and regards, Dieter -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Sorry, forget 2^24 and 2^32 as INTEGERs in ETH Oberon are only 16 bit. The easiest way is probably: VAR col: Display.Color; rgb565: INTEGER; a: ARRAY 1000, 1000 OF INTEGER; FOR y := 0 TO 999 DO FOR x := 0 TO 999 DO rgb565 := a[x,y]; col := Display.RGB( rgb565 DIV 2048, rgb565 DIV 32 MOD 64, rgg565 MOD 32 ); Display.Dot(col, x, y, Display.replace) END END Jörg
Am 12.09.2018 um 18:15 schrieb Jörg Straube <joerg.straube@iaeth.ch>:
Dieter
Before trying to give a possible solution, I have some questions: - What is the range of values of your integers? 0..2^8, 0..2^16, 0..2^24, 0..2^32 - What do you expect to be displayed on screen? - How big is your screen? - How many colors do you have?
br Jörg
Am 12.09.2018 um 16:43 schrieb Dieter <d.gloetzel@web.de>:
Is there a simple way with ETHOberon (System 3 on Windows) to display a large integer matrix (e.g. 1000 * 1000) as a raster image on screen?
Thanks and regards, Dieter -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (3)
-
Dieter -
Jörg Straube -
Søren Renner