Move first parameter "protected

Frank Heckenbach frank at g-n-u.de
Fri Mar 14 22:59:38 CET 2003


Peter N Lewis wrote:

> In move.pas, the Move et al are defined as:
> 
> procedure MoveLeft  (const Source; var Dest; Count: SizeType); 
> asmname '_p_MoveLeft';
> procedure MoveRight (const Source; var Dest; Count: SizeType); 
> asmname '_p_MoveRight';
> procedure Move      (const Source; var Dest; Count: SizeType); 
> asmname '_p_Move';
> 
> Given the comment in the documentation that const could be passed 
> either as value or reference, should the first parameter be 
> "protected var"?  I presume since they are type-less, they can't be 
> copied, so it has to be reference, so it would always be technically 
> ok to be left as const, but "protected var" would seem more 
> sensible...?

As you say, for untyped parameters, it makes no actual difference.
One reason for `const' would be that untyped parameters are a BP
extension, and BP only knows `const', so it would be "consistent".

But I don't care too much. If you prefer it to be changed, just send
me a patch.

Frank

-- 
Frank Heckenbach, frank at g-n-u.de, http://fjf.gnu.de/, 7977168E
GPC To-Do list, latest features, fixed bugs:
http://www.gnu-pascal.de/todo.html
GPC download signing key: 51FF C1F0 1A77 C6C2 4482  4DDC 117A 9773 7F88 1707




More information about the Gpc mailing list