🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.oberon
Article #1300

Re: The Trouble with WITH...

#1300
From: Stefan Ludwig
Date: Tue, 09 Apr 1996 07:36
28 lines
1453 bytes
Mark Hamburg writes:

> The canonical form for a frame handler in the Oberon system begins with a
> WITH on a pointer. (For example, see Reiser 19.4.1, p. 270.) One could

And that's the "wrong way" to do it.

I let Brian Hawley point out the "right way":

> PROCEDURE *Handle(o: Object; VAR msg: ObjectMsg);
> VAR f: Frame;
> BEGIN
>   f := o(Frame);
>   ... (* operations on f instead of o *)
> END Handle;

This is how I and many others here write their code. Maybe we should write a 'Fallacies and Pitfalls' page (with Oberon, it will only be one page :-) summing up those few problems that can occur in Oberon. (Maybe there already is such a document and I'm not aware of it...)

Regards,

  Stefan H-M Ludwig              mailto:ludwig@inf.ethz.ch
                                 http://www-cs.inf.ethz.ch/~ludwig
  Institute for Computer Systems
  Swiss Federal Institute of Technology (ETH)
  CH-8092 Zurich, Switzerland

  Phone: 41-1-632 7301
  Fax  : 41-1-632 1307
Technical Details
Message-ID: <4kd41f$p0a@lillian.inf.ethz.ch>
Path: arc1-ca.pugleaf.net!inf.ethz.ch!not-for-mail
References: <4jvvs3$93h@lillian.inf.ethz.ch> <4k11r7$k6b@newsbf02.news.aol.com> <4k299u$dgm@artemis.it.luc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!inf.ethz.ch!not-for-mail
From: ludwig@inf.ethz.ch (Stefan Ludwig)
Newsgroups: comp.lang.oberon
Subject: Re: The Trouble with WITH...
Date: 9 Apr 1996 09:36:15 +0200
Organization: Dept. Informatik, Swiss Federal Institute of Technology
Message-ID: <4kd41f$p0a@lillian.inf.ethz.ch>
References: <4jvvs3$93h@lillian.inf.ethz.ch> <4k11r7$k6b@newsbf02.news.aol.com> <4k299u$dgm@artemis.it.luc.edu>
NNTP-Posting-Host: lillian.inf.ethz.ch