>I am having difficulties returning records from functions. > >In the fn below, I am trying to make one record equal to another, which >works inside the fn, but not outside. > >Is there a short form which would work to return the values in the >record, or do I have to equate each field in the record separately as in >the example below. > > >Begin RECORD Pts >DIM PtX as double >DIM PtY as double'Jan 31, 2001 >END RECORD > > >clear local >DIM InSeamPtA as Pts '1st offset pt on outgoing line >DIM InSeamPtB as Pts 'second offset pt on outgoing' >LOCAL FN GetOffsetPos(LastPt as .Pts,MidPt as .Pts,SeamPt as .Pts,SeamPt2 >as .pts) > <SNIP> <SNIP> >FN GetOffsetPos(@LastPt,@MidPt,@SeamPt,@SeamPt2) What you have to do is specify them as pointers to that sort of record. No other changes other than those below should be required. Send me the code and I'll do it for you if you want. Therfore LOCAL FN GetOffsetPos(LastPt as .Pts,MidPt as .Pts,SeamPt as .Pts,SeamPt2 as .pts) becomes LOCAL FN GetOffsetPos(LastPt as ptr to .Pts,MidPt as ptr to .Pts,SeamPt as ptr to .Pts,SeamPt2 as ptr to .pts) and FN GetOffsetPos(@LastPt,@MidPt,@SeamPt,@SeamPt2) becomes FN GetOffsetPos(LastPt,MidPt,SeamPt,SeamPt2) That's how I've always done it. Regards, Ashley ~)~ =================================================================== Ashley Butterworth Email: Ashley@... ===================================================================