Re: Component Pascal wish list

From: Juan <"Juan">
Date: Mon, 24 Jun 2002 10:18:32 +0200

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

> 1. Multidimensional open array parameters. Just try the following
in Component Pascal if you don't know at compile time how big the array size
will be:
>
> PROCEDURE SmoothImage( INOUT INTEGER TwoDimArray [ ] [ ] );
> BEGIN END SmoothImage;
>
> I had to write it in pseudo-code, because as far as I know, IT'S
COMPLETELY IMPOSSIBLE IN Component Pascal. However, the Oberon compiler
included in the Native Oberon system handles this problem neatly.
>

Try the following code:

MODULE Test;

IMPORT Out;

PROCEDURE Proc(IN x: ARRAY OF ARRAY OF INTEGER);
VAR
 i, j: INTEGER;
BEGIN
 FOR j := 0 TO LEN(x, 1) - 1 DO
  FOR i := 0 TO LEN(x, 0) - 1 DO
   Out.Int(x[i, j], 5); Out.Ln
  END
 END
END Proc;

PROCEDURE Main*;
VAR
 a: ARRAY 2, 2 OF INTEGER;
BEGIN
 a[0, 0] := 1;
 a[0, 1] := 2;
 a[1, 0] := 3;
 a[1, 1] := 4;
 Proc(a);
END Main;

END Test.

Regards,
Juan Antonio


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

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-1128784439_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQ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YWluaW5nIHRoZSB3b3JkICJoZWxwIiB0byB0aGUgYWJvdmUgYWRkcmVzcy5ccGFyDQpccGFy
DQpTZW5kIGFueSBwcm9ibGVtIHJlcG9ydHMgb3IgcXVlc3Rpb25zIHJlbGF0ZWQgdG8gdGhpcyBl
bWFpbCBsaXN0IHRvIHRoZSBsaXN0IG93bmVyIGF0XHBhcg0KICAgb3duZXItYmxhY2tib3hAb2Jl
cm9uLmNoXHBhcg0KXHBhcg0KQ3VycmVudCBwb3N0aW5nIHBvbGljeTpccGFyDQpccGFyDQphKSBU
byBwb3N0IHlvdSBzaG91bGQgdXNlIHRoZSBzYW1lIGFkZHJlc3MgYnkgd2hpY2ggeW91IGFyZSBz
dWJzY3JpYmVkIHRvIHRoZSBtYWlsaW5nIGxpc3QuIFRoYXQgd2F5LCB0aGUgbGlzdCBzZXJ2ZXIg
d2lsbCByZWNvZ25pemUgeW91IGFzIHN1YnNjcmliZXIgYW5kIGZvcndhcmQgeW91ciBwb3N0aW5n
IGltbWVkaWF0ZWx5LCB3aXRob3V0IGNyZWF0aW5nIGFueSBvdmVyaGVhZC5ccGFyDQpccGFyDQpi
KSBJZiwgZm9yIHNvbWUgcmVhc29uLCB5b3UgY2Fubm90IHBvc3QgZnJvbSB0aGUgYWRkcmVzcywg
Ynkgd2hpY2ggeW91IGFyZSBzdWJzY3JpYmVkLCB5b3VyIG1lc3NhZ2Ugd2lsbCBiZSBtb2RlcmF0
ZWQgdG8gYXZvaWQgc3BhbS4gUGxlYXNlIHVuZGVyc3RhbmQgdGhhdCBtb2RlcmF0aW9uIHdpbGwg
b2Z0ZW4gY2F1c2Ugc29tZSBkZWxheSwgaW4gcGFydGljdWxhciBvdmVyIHdlZWtlbmRzIG9yIGhv
bHlkYXl9fQAtY20uYWI=


----boundary-LibPST-iamunique-1128784439_-_---
Received on Mon Jun 24 2002 - 10:18:32 UTC

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