On 13 Dec 2001, at 1:41, Frank Heckenbach wrote:
Martin Liddle wrote:
What should the trim function do? It seems to me that under gpc it removes trailing spaces from a string. Under Delphi it removes leading and trailing spaces. Unfortunately I don't have any Turbo Pascal documentation to hand (I assume trim is a Borlandism).
Nope, it's EP (6.7.6.7), and the correct behaviour is indeed to remove only trailing spaces.
Since it's only a built-in function, not a keyword, it's easy to overload it in a Delphi compatibility unit if someone wants Delphi's incorrect behaviour ...
This is done in the GPC "sysutils" unit. You can download this from; ftp://agnes.dida.physik.uni-essen.de/home/chief/sysutils/
Best regards, The Chief --------- Prof. Abimbola Olowofoyeku (The African Chief) Author of Chief's Installer Pro for Win32 Email: African_Chief@bigfoot.com http://www.bigfoot.com/~african_chief/