Re: [BLACKBOX] Re [BLACKBOX] Seasons Greetings from Linuxland

From: [at]} <Robert>
Date: Tue, 28 Dec 2010 10:45:23 +0000

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

Hiya

Seasons Greeting !

Personally I much prefer the forms:

b := ~a
&
RETURN BooleanExpresssion ()

to the long-winded alternatives mentioned.


On the other hand I dislike (*both*) examples below; what is wrong with the simple

   WriteInt (ABS (a - b)) ?


My memory of PASCAL is very rusty and my knowledge of c is non-existent, so do
not take these comment below too seriously.

I think that 'writeln' is part of the PASCAL language, not a very good part,
and removed from languages like Modula-II & Oberon.

I think that 'printf' is not part of c, but is in a library. Possibly printf
is a much better (more flexible, more controllable, more complicated?) procedure
than writeln. What I dislike about both is that you cannot easily tell from the
source whether it is a library procedure or not, or which library it is in.


Do we have, or want, a similar, or better, procedure in Oberon / Component Pascal?


Maybe, as a group, rather than discussing the imagined benefits of various
languages it would be more useful to discuss the characteristics of particular
library modules. Then if there is a consensus that a particular function (for
example printing an integer) is desirable we can at least do something about it.


Anyway I am off skiing for a week, and not taking a computer (or phone) with me.

Seasons greetings again - Robert.



On 28/12/2010 09:17 AM, Frans-Pieter Vonck wrote:

> thanks for your contemplation about the blindness in faith of the oberon
> users...
>
> Below I quote two versions of an standard io programme given by Skiena ,
> one in C the other in Pacal
>
> #include<stdio.h>
>
> int main() {
> long p,q,r;
>
> while (scanf("%ld %ld",&p,&q)
> !=EOF) {
> if (q>p) r=q-p;
> else r=p-q;
>
> printf("%ld\n",r);
> }
> }
>
>
> {$N+}
> program acm;
> var
> a, b, c : integer;
> begin
> while not eof do
> begin
> readln(a, b);
> if b> a then
> begin
> c := b;
> b := a;
> a := c
> end;
> writeln(a - b);
> end
> end.


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1611364774_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc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gICAgICBcfVxw
YXINCj4gXH1ccGFyDQo+XHBhcg0KPlxwYXINCj4gXHskTitcfVxwYXINCj4gcHJvZ3JhbSBhY207
XHBhcg0KPiB2YXJccGFyDQo+ICAgIGEsIGIsIGMgOiBpbnRlZ2VyO1xwYXINCj4gYmVnaW5ccGFy
DQo+ICAgIHdoaWxlIG5vdCBlb2YgZG9ccGFyDQo+ICAgIGJlZ2luXHBhcg0KPiAgICAgIHJlYWRs
bihhLCBiKTtccGFyDQo+ICAgICAgaWYgYj4gIGEgdGhlblxwYXINCj4gICAgICBiZWdpblxwYXIN
Cj4gICAgICAgIGMgOj0gYjtccGFyDQo+ICAgICAgICBiIDo9IGE7XHBhcg0KPiAgICAgICAgYSA6
PSBjXHBhcg0KPiAgICAgIGVuZDtccGFyDQo+ICAgICAgd3JpdGVsbihhIC0gYik7XHBhcg0KPiAg
ICBlbmRccGFyDQo+IGVuZC5ccGFyDQpccGFyDQpccGFyDQotLS0tXHBhcg0KVG8gdW5zdWJzY3Jp
YmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFDS0JPWCIgdG8gTElTVFNF
UlZATElTVFMuT0JFUk9OLkNIfX0AAB4AAA==
----boundary-LibPST-iamunique-1611364774_-_---
Received on Tue Dec 28 2010 - 11:45:23 UTC

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