[Oberon] objects and jewels

eas lab lab.eas at gmail.com
Tue Feb 19 06:51:45 CET 2013


This sounds interesting.
Is a 'pin' a hardware-connector-pin?
Is 'the modular way' of 'controlling a pin':
   latching the corresponding outport via the corresponding native machine code?

This thread could be chance a to exercise Wirthian adequate explanation via
minimum words.


On 2/18/13, Frans-Pieter Vonck <fp at vonck.nl> wrote:
> Hi Oberoneurs,
>
> I try to "reverse engineer" the arduino language in Oberon07.
> In arduino speak you create an servo object like this:
> <code>
> Servo myservo;  // create servo object to control a servo
>
> void setup()
> {
>   myservo.attach(9);  // attaches the servo on pin 9 to the servo object
> }
> </code>
>
> In oberon(07) this would become something like:
> MODULE Example
> IMPORT SERVO;
> VAR myservo : SERVO.servo;
>
> BEGIN
>   SERVO.Init(myservo,9)
> END Example
>
> I remember reading an argument of Wirth against object orientation. However
> the object way, "myservo.atttach(9)" seems more elegant than the modular
> way. Did I overlook something?
>
> Greets,
> Frans-Pieter
>
>
>
>
>
>
>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>



More information about the Oberon mailing list