New GPC beta: gpc-971001_(re)
Mon, 13 Oct 1997 13:38:54 +0200
Peter Gerwinski wrote:
> > - One that always makes a copy on the stack and copies the string into it.
> > That's the secure way, but inefficient with very long strings.
>
> Concerning CStrings? You mean a switch?
It could also be a switch. But wouldn't it be "cleaner" to write it as a
function? "CStrFunc (Str2CStr (StrVar))" or so...
> > - One that allocates the memory on the heap. This is needed when the
> > resulting CString is to be used outside of the current scope (when it's
> > not only passed to a function).
> >
> > - One that copies the string in a buffer allocated by the programmer (this
> > is perhaps only for compatibility with BP's StrPCopy).
>
> What functions do you mean? Built-in replacements for BP's functions from
> the `Strings' Unit?
Of course, they could be external functions as well. It's no problem to
implement them in Pascal. But I think in the long run, all such standard
functions will be built-in.
--
Frank Heckenbach, Erlangen, Germany
heckenb@mi.uni-erlangen.de
http://home.pages.de/~fjf/links.htm
Frank Heckenbach (heckenb@mi.uni-erlangen.de)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es