- Pascal to Component Pascal translators

From: Bob Walkden <"Bob>
Date: Wed, 26 Oct 2005 08:36:46 +0100

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

Chris,

> It is a relatively simple and mechanical exercise to
> translate structured IF-THEN-ELSE. WHILE, REPEAT, FOR
> statements into a form which only uses GOTOs. The converse is not.

yes, I found that out for sure. In translating a goto program into a no-goto
program there's no substitute for a brain. Some varieties of COBOL allowed
you to do strange things. We used COBOL and PLAN (an assembler) on ICL 1901T
mainframes. One of my colleagues discovered a way to GO TO a location in
working storage, where he had coded some constants in object code, so the
program could execute its own working storage. This did not lead to readable
source code, and should be considered harmful.

Interesting factoid: Dijkstra did not come up with the term 'considered
harmful' for the title of his famous paper. Niklaus Wirth did.

--
Regards,
 Bob 
> -----Original Message-----
> From: blackbox{([at]})nowhere.xy> Behalf Of CFB Software
> Sent: 26 October 2005 02:39
> To: BlackBox Mailing List
> Subject: [BlackBox] - Pascal to Component Pascal translators
> 
> Hi Bob,
> 
> There's a warning in Dijkstra's 1968 paper "Go To Statement 
> Considered Harmful" related to the paper that you referenced:
> 
> "In [2] Guiseppe Jacopini seems to have proved the (logical) 
> superfluousness of the go to statement. The exercise to 
> translate an arbitrary flow diagram more or less mechanically 
> into a jump-less one, however, is not to be recommended. Then 
> the resulting flow diagram cannot be expected to be more 
> transparent than the original one." 
> 
> It is a relatively simple and mechanical exercise to 
> translate structured IF-THEN-ELSE. WHILE, REPEAT, FOR 
> statements into a form which only uses GOTOs. The converse is not.
> 
> 
> On a lighter note, there was an amusing article proposing a 
> 'COME FROM'
> statement as a solution to the problem of GOTOs:
> 
> http://www.fortran.com/fortran/come_from.html
> 
> In a similar vein, I also like the 'IF THEN MAYBE' and 'GO SOMEWHERE'
> proposals of MAYBEBOL:
> 
> http://buffy.sighup.org.uk/hfiles/aafn.html
>  
> 
> Regards,
> Chris
> 
> Chris Burrows
> CFB Software
> http://www.cfbsoftware.com/gpcp
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy----boundary-LibPST-iamunique-390271936_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIENocmlzLFxwYXINClxwYXINCj4gSXQgaXMgYSBy
ZWxhdGl2ZWx5IHNpbXBsZSBhbmQgbWVjaGFuaWNhbCBleGVyY2lzZSB0byBccGFyDQo+IHRyYW5z
bGF0ZSBzdHJ1Y3R1cmVkIElGLVRIRU4tRUxTRS4gV0hJTEUsIFJFUEVBVCwgRk9SIFxwYXINCj4g
c3RhdGVtZW50cyBpbnRvIGEgZm9ybSB3aGljaCBvbmx5IHVzZXMgR09UT3MuIFRoZSBjb252ZXJz
ZSBpcyBub3QuXHBhcg0KXHBhcg0KeWVzLCBJIGZvdW5kIHRoYXQgb3V0IGZvciBzdXJlLiBJbiB0
cmFuc2xhdGluZyBhIGdvdG8gcHJvZ3JhbSBpbnRvIGEgbm8tZ290b1xwYXINCnByb2dyYW0gdGhl
cmUncyBubyBzdWJzdGl0dXRlIGZvciBhIGJyYWluLiBTb21lIHZhcmlldGllcyBvZiBDT0JPTCBh
bGxvd2VkXHBhcg0KeW91IHRvIGRvIHN0cmFuZ2UgdGhpbmdzLiBXZSB1c2VkIENPQk9MIGFuZCBQ
TEFOIChhbiBhc3NlbWJsZXIpIG9uIElDTCAxO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bXVzaW5nIGFydGljbGUgcHJvcG9zaW5nIGEgXHBhcg0KPiAnQ09NRSBGUk9NJ1xwYXIN
Cj4gc3RhdGVtZW50IGFzIGEgc29sdXRpb24gdG8gdGhlIHByb2JsZW0gb2YgR09UT3M6XHBhcg0K
PiBccGFyDQo+IGh0dHA6Ly93d3cuZm9ydHJhbi5jb20vZm9ydHJhbi9jb21lX2Zyb20uaHRtbFxw
YXINCj4gXHBhcg0KPiBJbiBhIHNpbWlsYXIgdmVpbiwgSSBhbHNvIGxpa2UgdGhlICdJRiBUSEVO
IE1BWUJFJyBhbmQgJ0dPIFNPTUVXSEVSRSdccGFyDQo+IHByb3Bvc2FscyBvZiBNQVlCRUJPTDpc
cGFyDQo+IFxwYXINCj4gaHR0cDovL2J1ZmZ5LnNpZ2h1cC5vcmcudWsvaGZpbGVzL2FhZm4uaHRt
bFxwYXINCj4gIFxwYXINCj4gXHBhcg0KPiBSZWdhcmRzLFxwYXINCj4gQ2hyaXNccGFyDQo+IFxw
YXINCj4gQ2hyaXMgQnVycm93c1xwYXINCj4gQ0ZCIFNvZnR3YXJlXHBhcg0KPiBodHRwOi8vd3d3
LmNmYnNvZnR3YXJlLmNvbS9ncGNwXHBhcg0KXHBhcg0KLS0tIEJsYWNrQm94XHBhcg0KLS0tIHNl
bmQgc3ViamVjdCBIRUxQIG9yIFVOU1VCU0NSSUJFIHRvIGJsYWNrYm94QG9iZXJvbi5jaFxwYXIN
ClxwYXINCn0=
----boundary-LibPST-iamunique-390271936_-_---
Received on Wed Oct 26 2005 - 09:36:46 UTC

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