gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] Suggestion to reverse names in PIM Strings library to remove possi


From: Carl Glassberg
Subject: [Gm2] Suggestion to reverse names in PIM Strings library to remove possible confusion
Date: Mon, 1 Mar 2010 08:07:46 -0800 (PST)

Hello again.

The following is not a bug in that the procedures work as documented and the 
calls are consistent. But since you are using dest and source as the names for 
your parameters, you might consider reversing all the relevant uses because I 
believe they are actually opposite the usual usage. Just a suggestion anyway.

EXISTING library: Strings.def
(*
   Assign - source := dest.
*)

PROCEDURE Assign (VAR source: ARRAY OF CHAR; dest: ARRAY OF CHAR) ;

RECOMMENDED change to:

(*
   Assign - dest := source :
*)

PROCEDURE Assign (VAR dest: ARRAY OF CHAR; source: ARRAY OF CHAR) ;


EXISTING Strings.mod:
(*
   Assign - source := dest.
*)

PROCEDURE Assign (VAR source: ARRAY OF CHAR; dest: ARRAY OF CHAR) ;
BEGIN
   StrLib.StrCopy(dest, source)
END Assign ;


RECOMMENDED change to:

(*
   Assign - dest := source
*)

PROCEDURE Assign (VAR dest: ARRAY OF CHAR; source: ARRAY OF CHAR) ;
BEGIN
   StrLib.StrCopy(source, dest)
END Assign ;

This is a minor point, but it might be confusing to leave it as currently named.

Carl











reply via email to

[Prev in Thread] Current Thread [Next in Thread]