Re: Compiler error "parameter does not match" (a bug?)

From: [at]} <Wojtek>
Date: Tue, 1 Jul 2003 22:03:01 -0400 (EDT)

----boundary-LibPST-iamunique-866348015_-_-
Content-type: text/plain

Fyodor:

  thanks a lot. I was confused because they say that the old style
Oberon declarations are no longer necessary. You remember, these
RecordDesc and POINTER TO RecordDesc from the original Oberon?
I noted mentally that this is now gone and one can just use
POINTER everywhere.

My problem was that I need the RECORD, not pointer to record,
because Controls do not take pointers.

I now wrote the following and it now compiles, but I do not know
if it works or not. Recently I was bitten by the BlackBox Dialog/Control
pair, so now I am bracing for another round of hidden problems.


MODULE DanomTest;
IMPORT Stores, Dialog;
TYPE
  PT* = RECORD (Stores.Store)
    tree*: Dialog.Tree
  END;
  PPT = POINTER TO PT; (*note that not exported*)

(*Note that the following are exported, even though PPT is not.
  Is this not surprising??*)

PROCEDURE (ppt: PPT) Internalize-(VAR rd: Stores.Reader);
  END Internalize;

PROCEDURE (ppt: PPT) Externalize-(VAR wr: Stores.Writer);
  END Externalize;

END DanomTest.



Wojtek Skulski skulski{([at]})nowhere.xy
On Wed, 2 Jul 2003 ftkachov{([at]})nowhere.xy

> Dear Wojtek,
>
> This is certainly not a bug.
> One cannot change the signutare in the overriding method
> except by narrowing the receiver type and the function result type.
>
> Stores.Store is a pointer, and In/Externalize are defined with
> the pointer as receiver, so one cannot use a VAR record there.
>
> Perhaps if the language now allows one to define
> a pointer type extending a record type and vice versa,
> it might be logical that it should be allowed
> to use either pointer or a variable as the receiver.
>
> But perhaps there are hidden obstacles for that?
>
> Cheers
> Fyodor Tkachov

--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-866348015_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEZ5b2RvcjpccGFyDQpccGFyDQogIHRoYW5rcyBh

IGxvdC4gSSB3YXMgY29uZnVzZWQgYmVjYXVzZSB0aGV5IHNheSB0aGF0IHRoZSBvbGQgc3R5bGVc
cGFyDQpPYmVyb24gZGVjbGFyYXRpb25zIGFyZSBubyBsb25nZXIgbmVjZXNzYXJ5LiBZb3UgcmVt
ZW1iZXIsIHRoZXNlXHBhcg0KUmVjb3JkRGVzYyBhbmQgUE9JTlRFUiBUTyBSZWNvcmREZXNjIGZy
b20gdGhlIG9yaWdpbmFsIE9iZXJvbj9ccGFyDQpJIG5vdGVkIG1lbnRhbGx5IHRoYXQgdGhpcyBp
cyBub3cgZ29uZSBhbmQgb25lIGNhbiBqdXN0IHVzZVxwYXINClBPSU5URVIgZXZlcnl3aGVyZS5c
cGFyDQpccGFyDQpNeSBwcm9ibGVtIHdhcyB0aGF0IEkgbmVlZCB0aGUgUkVDT1JELCBub3QgcG9p
bnRlciB0byByZWNvcmQsXHBhcg0KYmVjYXVzZSBDb250cm9scyBkbyBub3QgdGFrZ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NzLCBieSB3aGljaCB5b3UgYXJl
IHN1YnNjcmliZWQsIHlvdXIgbWVzc2FnZSB3aWxsIGJlIG1vZGVyYXRlZCB0byBhdm9pZCBzcGFt
LiBQbGVhc2UgdW5kZXJzdGFuZCB0aGF0IG1vZGVyYXRpb24gd2lsbCBvZnRlbiBjYXVzZSBzb21l
IGRlbGF5LCBpbiBwYXJ0aWN1bGFyIG92ZXIgd2Vla2VuZHMgb3IgaG9seWRheX19ACth3x8AJw==


----boundary-LibPST-iamunique-866348015_-_---
Received on Wed Jul 02 2003 - 04:03:01 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:10 UTC