[Oberon] objects and jewels
fp at vonck.nl
Tue Feb 19 18:17:05 CET 2013
>adequate explanation via minimum words.
Luckily the ARMs nowadays come with plenty of memory.
> 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
> 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:
>> Servo myservo; // create servo object to control a servo
>> void setup()
>> myservo.attach(9); // attaches the servo on pin 9 to the servo object
>> In oberon(07) this would become something like:
>> MODULE Example
>> IMPORT SERVO;
>> VAR myservo : SERVO.servo;
>> END Example
>> I remember reading an argument of Wirth against object orientation.
>> the object way, "myservo.atttach(9)" seems more elegant than the
modular way. Did I overlook something?
>> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related
More information about the Oberon