(unknown charset) Re: [BLACKBOX] Order of calculating parameters

From: (unknown charset) [at]} <Josef>
Date: Thu, 7 Feb 2013 17:42:14 +0100

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

in more recent languages such as Java or C# the evaluation order of
operands (incl. parameters) is always defined from left to right.
In Oberon, however, as far as I remember, it is left undefined.
The reason, as you mentioned, is that different platforms
may have different calling conventions and it leaves a bit more
freedom for the compiler to do optimizations.

- Josef


----- Original Message -----
From: "Oleg N. Cher" <allot{([at]})nowhere.xy
To: <BLACKBOX{([at]})nowhere.xy
Sent: Thursday, February 07, 2013 4:41 PM
Subject: [BLACKBOX] Order of calculating parameters


> Dear All,
>
> Is the order of calculating parameters uniquely defined in standard of
> Component Pascal (or Oberon/Oberon-2)? I've this situation.
>
> PROCEDURE GetData (): INTEGER;
> BEGIN (* The data is taken from array "arr", indexed by var "idx". Order
> of taken data is one by one. *)
> INC(idx); RETURN arr[idx]
> END GetData;
>
> ...
> (* Example code: *)
> PutTile(GetData(), GetData(), GetData()); (* x, y, tile number *)
> ...
>
> If the order always left to right (as, in Turbo Pascal/Delphi, data must
> be: x, y, tileNum.
> If the order always right to left (just as, in some C compilers) data
> must be: tileNum, y, x.
>
> I understand of course, that things depends on used calling convention
> model. But standards of Oberons must provide the own independent order,
> as I think.
>
>
> --
> Oleg N. Cher
> VEDAsoft Oberon Club
> http://zx.oberon2.ru
>
>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-681350654_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGZiaWRpcyBcZGVmZjB7XGZvbnR0YmwN
CntcZjBcZnN3aXNzIEFyaWFsO30NCntcZjFcZm1vZGVybiBDb3VyaWVy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KPiBJIHVuZGVyc3RhbmQgb2YgY291cnNlLCB0aGF0IHRo
aW5ncyBkZXBlbmRzIG9uIHVzZWQgY2FsbGluZyBjb252ZW50aW9uIFxwYXINCj4gbW9kZWwuIEJ1
dCBzdGFuZGFyZHMgb2YgT2Jlcm9ucyBtdXN0IHByb3ZpZGUgdGhlIG93biBpbmRlcGVuZGVudCBv
cmRlciwgXHBhcg0KPiBhcyBJIHRoaW5rLlxwYXINCj4gXHBhcg0KPiBccGFyDQo+IC0tIFxwYXIN
Cj4gT2xlZyBOLiBDaGVyXHBhcg0KPiBWRURBc29mdCBPYmVyb24gQ2x1YlxwYXINCj4gaHR0cDov
L3p4Lm9iZXJvbjIucnVccGFyDQo+IFxwYXINCj4gXHBhcg0KPiAtLS0tXHBhcg0KPiBUbyB1bnN1
YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBM
SVNUU0VSVkBMSVNUUy5PQkVST04uQ0hccGFyDQpccGFyDQpccGFyDQotLS0tXHBhcg0KVG8gdW5z
dWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFDS0JPWCIgdG8g
TElTVFNFUlZATElTVFMuT0JFUk9OLkNIfX0AbiwgaA==
----boundary-LibPST-iamunique-681350654_-_---
Received on Thu Feb 07 2013 - 17:42:14 UTC

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