I have find I have duplicated the procedure NewString in 95 modules. Until recently
I didn't have a home for that procedure. I just created that home and call the module
"StdStrings". Here is what that looks like.
Code: Select all
MODULE StdStrings;
TYPE
String* = POINTER TO ARRAY OF CHAR;
ShortString* = POINTER TO ARRAY OF SHORTCHAR;
PROCEDURE New* (IN x: ARRAY OF CHAR): String;
VAR s: String;
BEGIN
NEW(s, 1 + LEN(x$));
s^ := x$;
RETURN s
END New;
PROCEDURE NewShort* (IN x: ARRAY OF SHORTCHAR): ShortString;
VAR s: ShortString;
BEGIN
NEW(s, 1 + LEN(x$));
s^ := x$;
RETURN s
END NewShort;
END StdStrings.
I suggest we add that module to BB as a standard release for say 1.7.1
OR
include those two procedures and String TYPE in the module Strings.
Does that functionality already exist in some BB module of which I am not aware?
Comments?
-Doug