- Problem with pointer semantics

From: Marco Ciot <"Marco>
Date: Wed, 21 Jun 2006 10:36:39 +0200

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

> Maybe your programming background is primarily with C-heritage languages?

Very wrong assumption! ;)

Thanks for the correction of my statement towards COPY.

Marco


-----Original Message-----
From: blackbox{([at]})nowhere.xy
Software
Sent: Wednesday, June 21, 2006 02:35
To: BlackBox Mailing List
Subject: [BlackBox] - Problem with pointer semantics


> -----Original Message-----
> From: blackbox{([at]})nowhere.xy
> Behalf Of Marco Ciot
> Sent: Tuesday, 20 June 2006 8:35 PM
> To: BlackBox Mailing List
> Subject: [BlackBox] - Problem with pointer semantics
>
>
> I don't see much use in assigning an entire array to another
> as easily as "a := b".

Maybe your programming background is primarily with C-heritage languages? It
is ingrained knowledge for experienced Pascal-heritage programmers (i.e.
Pascal, Modula-2, Oberon and Component Pascal programmers) that entire
arrays, records and other arbitrary compound data structures can be assigned
with a simple assignment statement like "a := b". The compiler has all the
information

It is easy to spot a C programmer using Delphi or other extended Pascal
dialects - they use unsafe functions like MemCopy when trying to do this
sort of thing!

> In Oberon you had to use "COPY(b, a)".


No you didn't, "a := b" is used to copy arrays in Oberon. If fact you
*couldn't* use COPY for most array assignments. Oberon's COPY can only be
used with strings and character arrays. Additionally it is only a partial
copy - only copying up to, and including, the the first null character.

The equivalent to "COPY(b, a)" in Component Pascal is a := b$;

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy----boundary-LibPST-iamunique-2145324179_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rl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10:36:39 UTC

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