In S3 this works. MODULE Test; IMPORT Oberon, Texts, TextFrames, Out, Viewers; VAR nameS: Texts.Scanner; PROCEDURE Test*; VAR v: Viewers.Viewer; BEGIN v := Oberon.MarkedViewer(); Texts.OpenScanner(nameS, v.dsc(TextFrames.Frame).text, 0); Texts.Scan(nameS); Out.String("Marked viewer is named "); Out.String(nameS.s); Out.Char("."); Out.Ln END Test; BEGIN END Test. Mark the viewer and Test.Test * This is more succinct but gives the error "incompatible assignment". Edit.Locate leaves the caret after (). MODULE Test IN Oberon; IMPORT Oberon, Texts, TextFrames, Out, Viewers; VAR nameS: Texts.Scanner; PROCEDURE Test*; VAR v: Viewers.Viewer; BEGIN Texts.OpenScanner(nameS, Oberon.MarkedViewer().dsc(TextFrames.Frame).text, 0); Texts.Scan(nameS); Out.String("Marked viewer is named "); Out.String(nameS.s); Out.Char("."); Out.Ln END Test; BEGIN END Test. In the Oberon subsystem of A2, the preceeding compiles with no error. Anything interesting to learn from that? The (TextFrames.Frame) type cast seems a little devious. Can the result be accomplished without a type cast? 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 +1 http://easthope.ca/Peter.html Bcc: peter at easthope. ca
There were some 'features' like that in the S3 compiler in the days I still wrote commercial Oberon code.. An intermediate variable always fixed the problem. As in your first example. -- j. On Sat, Oct 20, 2018 at 3:52 PM <peter@easthope.ca> wrote:
In S3 this works.
MODULE Test; IMPORT Oberon, Texts, TextFrames, Out, Viewers; VAR nameS: Texts.Scanner; PROCEDURE Test*; VAR v: Viewers.Viewer; BEGIN v := Oberon.MarkedViewer(); Texts.OpenScanner(nameS, v.dsc(TextFrames.Frame).text, 0); Texts.Scan(nameS); Out.String("Marked viewer is named "); Out.String(nameS.s); Out.Char("."); Out.Ln END Test; BEGIN END Test.
Mark the viewer and Test.Test *
This is more succinct but gives the error "incompatible assignment". Edit.Locate leaves the caret after ().
MODULE Test IN Oberon; IMPORT Oberon, Texts, TextFrames, Out, Viewers; VAR nameS: Texts.Scanner; PROCEDURE Test*; VAR v: Viewers.Viewer; BEGIN Texts.OpenScanner(nameS, Oberon.MarkedViewer().dsc(TextFrames.Frame).text, 0); Texts.Scan(nameS); Out.String("Marked viewer is named "); Out.String(nameS.s); Out.Char("."); Out.Ln END Test; BEGIN END Test.
In the Oberon subsystem of A2, the preceeding compiles with no error. Anything interesting to learn from that?
The (TextFrames.Frame) type cast seems a little devious. Can the result be accomplished without a type cast?
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 +1 http://easthope.ca/Peter.html Bcc: peter at easthope. ca -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
On Sat, 20 Oct 2018 16:51:22 +0200 Jan de Kruyf <jan.de.kruyf@gmail.com> wrote:
in the days I still wrote commercial Oberon code..
Hi, interesting, make business with Oberon, still possible? How long ago then this was? What is the market these days? -- Tomas Kral <thomas.kral@email.cz>
The market is where you create it. This was 15 years ago, and the situation has not become easier. But having said that, one can always design embedded stuff and program it the way you want. PROVIDED there is a compiler. Constructing an Oberon front end to Gcc would be an excellent project. I cant wait for my next life to start it. Besides that you can use the Oberon 7 compiler as a P-code generator since there is a good interpreter available that is easily ported. -- j. On Sat, Oct 20, 2018 at 11:12 PM Tomas Kral <thomas.kral@email.cz> wrote:
On Sat, 20 Oct 2018 16:51:22 +0200 Jan de Kruyf <jan.de.kruyf@gmail.com> wrote:
in the days I still wrote commercial Oberon code..
Hi, interesting, make business with Oberon, still possible? How long ago then this was? What is the market these days?
-- Tomas Kral <thomas.kral@email.cz> -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (3)
-
Jan de Kruyf -
peter@easthope.ca -
Tomas Kral