- Problem with pointer semantics

From: [at]} <Wojtek>
Date: Tue, 20 Jun 2006 12:38:51 -0400 (EDT)

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

On Tue, 20 Jun 2006, [KOI8-R] Сергей Губанов wrote:

> What about this?
>
> TYPE Array = ARRAY 2 OF INTEGER;
> VAR a, b: POINTER TO Array;
>
> b^ := a^; (* value copy *)
> b := a; (* pointer copy *)

The problem becomes even more involved when the array elements
contain pointers to data structures, which in turn contain
pointers, and so on. We are entering a discussion of "shallow copy"
versus a "deep copy". The depth of the deep copy can also vary.
The deep copy can proceed to the deepest level, or it can
go a few steps deep, and then stop and some intermediate level.
Nothing is written in stone in such cases. It all depends on the
situation.

Would anybody seriously consider automating any of this?
In case the POINTER TO ARRAY OF RECORD is not automated, then
why POINTER TO ARRAY OF INTEGER should be automated? The latter
is the least of a problem if you consider possible problems
with nested structures.

Could someone please explain what is "Hungarian notation"?
I looked a few posts back and I only see arguments pro and con,
but not what it is. A definition please, and a short example?

Thanks, -- W.

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy



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

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCBPbiBUdWUsIDIwIEp1biAyMDA2
LCBbS09JOC1S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29uc2lk
ZXIgYXV0b21hdGluZyBhbnkgb2YgdGhpcz9ccGFyDQpJbiBjYXNlIHRoZSBQT0lOVEVSIFRPIEFS
UkFZIE9GIFJFQ09SRCAgaXMgbm90IGF1dG9tYXRlZCwgdGhlblxwYXINCndoeSBQT0lOVEVSIFRP
IEFSUkFZIE9GIElOVEVHRVIgc2hvdWxkIGJlIGF1dG9tYXRlZD8gVGhlIGxhdHRlclxwYXINCmlz
IHRoZSBsZWFzdCBvZiBhIHByb2JsZW0gaWYgeW91IGNvbnNpZGVyIHBvc3NpYmxlIHByb2JsZW1z
XHBhcg0Kd2l0aCBuZXN0ZWQgc3RydWN0dXJlcy5ccGFyDQpccGFyDQpDb3VsZCBzb21lb25lIHBs
ZWFzZSBleHBsYWluIHdoYXQgaXMgIkh1bmdhcmlhbiBub3RhdGlvbiI/XHBhcg0KSSBsb29rZWQg
YSBmZXcgcG9zdHMgYmFjayBhbmQgSSBvbmx5IHNlZSBhcmd1bWVudHMgcHJvIGFuZCBjb24sXHBh
cg0KYnV0IG5vdCB3aGF0IGl0IGlzLiBBIGRlZmluaXRpb24gcGxlYXNlLCBhbmQgYSBzaG9ydCBl
eGFtcGxlP1xwYXINClxwYXINClRoYW5rcywgLS0gVy5ccGFyDQpccGFyDQotLS0gQmxhY2tCb3hc
cGFyDQotLS0gc2VuZCBzdWJqZWN0IEhFTFAgb3IgVU5TVUJTQ1JJQkUgdG8gYmxhY2tib3hAb2Jl
cm9uLmNofX0AbXNwc3QuZGxsAA=


----boundary-LibPST-iamunique-653962273_-_---
Received on Tue Jun 20 2006 - 18:38:51 UTC

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