Hello people,
Again, I didn't see this in any FAQs or in the Bug List, so I am going to
post the question. The Moveleft and Moveright functions should basically
take a source and destination and copy the length number of bytes (from the
left or right respectively), correct? That is how it worked with the old
compiler I had, but I think we have come to the conclusion that it is
horribly nonstandard, and since there are no help files on moveleft and
moveright on the GPC page, I have to ask, and then ask if this is a bug.
My sample source is this:
TYPE
AnyStr = STRING[40];
AnyStrPtr = ^AnyStr;
VAR
TestVar1 : AnyStrPtr;
TestVar2 : AnyStrPtr;
TestVar3 : AnyStr;
TestVar4 : AnyStr;
BEGIN
TestVar3 := 'TEST1';
TestVar1 := AnyStrPtr(@TestVar3);
TestVar4 := 'TEST3';
TestVar2 := AnyStrPtr(@TestVar4);
writeln(TestVar1^);
writeln(TestVar2^);
MOVELEFT (TestVar1^, TestVar2^, (LENGTH(TestVar1^) + 1));
writeln("");
writeln("After");
writeln(TestVar1^);
writeln(TestVar2^);
END. { unit pSos }
With GPC, the output is:
TEST1 -> (TestVar1)
TEST3 -> (TestVar2)
After
TEST1 -> (TestVar1 after MoveLeft)
TEST3 -> (TestVar2 after MoveLeft)
With my old compiler, the output is:
TEST1
TEST3
After
TEST1
TEST1
As it basically copies the length bytes of TestVar1 into TestVar2. Now, my
question, does GPC work differently for this function, and if yes or no, is
this a bug.
Also, if you guys need some help finishing the GPC manual, let me know, I am
willing to lend a hand.
Adam Oldham
-----------------------------------------------------------------------
C. Adam Oldham Marconi Commerce Systems Inc.
Software Engineer 7300 West Friendly Ave.
adam.oldham(a)marconi.com Greensboro, NC 27420-2087
Phone : 336.547.5952 Fax : 336.547.5079
-----------------------------------------------------------------------
This document contains confidential information of Marconi Commerce
Systems Inc. In consideration of the receipt of this document, the
recipient agrees not to reproduce, copy, use or transmit this document
and/or the information contained herein, in whole or in part, or to
suffer such actions by others, for any purpose except with written
permission, first obtained, of Marconi Commerce Systems Inc., and
further agrees to surrender the same to Marconi Commerce Systems Inc.
upon demand.
-----------------------------------------------------------------------