A string enclosed by $ . . . $, as is used in modules Display or Input for example, is called HexString (see ORS.HexString). HexString is a little feature that elegantly addressed a small problem, but it was never intended to be widely used. That’s why it is not published in the language report - which means that it *is* officially not part of the language. But if you know what you are doing, you can - it likely won’t go away. And if it does, well, then you’d notice ;-) Andreas ----------------------------------------------------------------------------------
Jörg joerg.straube at iaeth.ch Mon Apr 24 18:10:34 CEST 2017 Officially, the Oberon language only offers expression for constant "array of chars”, called string constants. The constant "array of bytes" you are refering to is a feature of the compiler, not described in the language as far as I know.
It is also used eg. in the keyboard driver to translate keyboard strokes to chars.
br Jörg
----------------------------------------------------------------------------------
Am 24.04.2017 um 17:53 schrieb Tomas Kral <thomas.kral at email.cz <https://lists.inf.ethz.ch/mailman/listinfo/oberon>>:
Hi,
I have just discovered this interesting and useful construct, found in `Display.Mod', defining a pattern.
block := SYSTEM.ADR($0808 FFFF C3C3 C3C3 FFFF$);
pattern = w(byte) h(byte) {raster(byte)}
block* is exported, so can also be used in user modules.
Tomas -- Oberon at lists.inf.ethz.ch <https://lists.inf.ethz.ch/mailman/listinfo/oberon> mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon <https://lists.inf.ethz.ch/mailman/listinfo/oberon>
Is the HexString a back door, or is it an Easter Egg? Wojtek ________________________________________ From: Oberon [oberon-bounces@lists.inf.ethz.ch] on behalf of Andreas Pirklbauer [andreas_pirklbauer@yahoo.com] Sent: Monday, April 24, 2017 2:34 PM To: ETH Oberon and Related Systems Subject: [Oberon] FPGA - Inline Patterns A string enclosed by $ . . . $, as is used in modules Display or Input for example, is called HexString (see ORS.HexString). HexString is a little feature that elegantly addressed a small problem, but it was never intended to be widely used. That’s why it is not published in the language report - which means that it *is* officially not part of the language. But if you know what you are doing, you can - it likely won’t go away. And if it does, well, then you’d notice ;-) Andreas ----------------------------------------------------------------------------------
Jörg joerg.straube at iaeth.ch<https://urldefense.proofpoint.com/v2/url?u=http-3A__iaeth.ch&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=AjX4mGyZqV6BCQIpBpiPQGVDXn3clLaOkLctzDSlUhw&s=Q_ZGqBrTB2J2-LaAEcZPn4nETVCRAjNsozQSFIuFDaQ&e=> Mon Apr 24 18:10:34 CEST 2017
Officially, the Oberon language only offers expression for constant "array of chars”,
called string constants.
The constant "array of bytes" you are refering to is a feature of the compiler,
not described in the language as far as I know.
It is also used eg. in the keyboard driver to translate keyboard strokes to chars.
br Jörg
----------------------------------------------------------------------------------
Am 24.04.2017 um 17:53 schrieb Tomas Kral <thomas.kral at email.cz<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.inf.ethz.ch_mailman_listinfo_oberon&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=AjX4mGyZqV6BCQIpBpiPQGVDXn3clLaOkLctzDSlUhw&s=tzxY0UVNvxDsL0pj8pdiivAho58qvJJRfyKZt8OYtRQ&e=>>:
Hi,
I have just discovered this interesting and useful construct, found in `Display.Mod', defining a pattern.
block := SYSTEM.ADR($0808 FFFF C3C3 C3C3 FFFF$);
pattern = w(byte) h(byte) {raster(byte)}
block* is exported, so can also be used in user modules.
Tomas -- Oberon at lists.inf.ethz.ch<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.inf.ethz.ch_mailman_listinfo_oberon&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=AjX4mGyZqV6BCQIpBpiPQGVDXn3clLaOkLctzDSlUhw&s=tzxY0UVNvxDsL0pj8pdiivAho58qvJJRfyKZt8OYtRQ&e=> mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.inf.ethz.ch_mailman_listinfo_oberon&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=AjX4mGyZqV6BCQIpBpiPQGVDXn3clLaOkLctzDSlUhw&s=tzxY0UVNvxDsL0pj8pdiivAho58qvJJRfyKZt8OYtRQ&e=>
Hi, I am toying with ETH `Bitmaps.Mod' now compiled under RISC/FPGA, and partly ported, supporting so far B&W Copy, CopyBlock. $..$ helps with me testing Bitmaps.CopyPattern, I pass various patterns defined in Display.Mod to it. In various languages, FORTRAN, BASIC, there is DATA statement. I understand these are frowned upon in Wirthian true language sense. But If I needed a persistent constant block of data, could I use CONST somehow? What is the recommended way? Tomas On Mon, 24 Apr 2017 20:34:29 +0200 Andreas Pirklbauer <andreas_pirklbauer@yahoo.com> wrote:
A string enclosed by $ . . . $, as is used in modules Display or Input for example, is called HexString (see ORS.HexString). HexString is a little feature that elegantly addressed a small problem, but it was never intended to be widely used. That’s why it is not published in the language report - which means that it *is* officially not part of the language. But if you know what you are doing, you can - it likely won’t go away. And if it does, well, then you’d notice ;-) Andreas
----------------------------------------------------------------------------------
Jörg joerg.straube at iaeth.ch Mon Apr 24 18:10:34 CEST 2017 Officially, the Oberon language only offers expression for constant "array of chars”, called string constants. The constant "array of bytes" you are refering to is a feature of the compiler, not described in the language as far as I know.
It is also used eg. in the keyboard driver to translate keyboard strokes to chars.
br Jörg
----------------------------------------------------------------------------------
Am 24.04.2017 um 17:53 schrieb Tomas Kral <thomas.kral at email.cz <https://lists.inf.ethz.ch/mailman/listinfo/oberon>>:
Hi,
I have just discovered this interesting and useful construct, found in `Display.Mod', defining a pattern.
block := SYSTEM.ADR($0808 FFFF C3C3 C3C3 FFFF$);
pattern = w(byte) h(byte) {raster(byte)}
block* is exported, so can also be used in user modules.
Tomas -- Oberon at lists.inf.ethz.ch <https://lists.inf.ethz.ch/mailman/listinfo/oberon> mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon <https://lists.inf.ethz.ch/mailman/listinfo/oberon>
participants (3)
-
Andreas Pirklbauer -
Skulski, Wojciech -
Tomas Kral