`
Clarion in general: Passing queue by address for updates 2004-12-26 -- Shankarj Newsgroups: softvelocity.public.clarion6 >Hello, I want to pass a queue to another procedure, have it change some >values of the queue, and then I want to act on those changes in the >original procedure. > >What's the best way these days to pass a queue back and forth? You can TYPE a Queue and pass it as suggested by James and others, but I often pass the Queue and the Queue fields by address especially if I need to access/update only a few of the queue fields. Proc1 PROCEDURE MyQ QUEUE,PRE(MQ) F1 STRING F2 LONG END CODE ... Proc2(MyQ, MQ:F1, MQ:F2) ... RETURN Proc2 PROCEDURE(*QUEUE InpQ, *STRING QFld1, *LONG QFld2) CODE QFld1 = 'ABC' QFld2 = 1 ADD(InpQ) !~! QFld2 = 1 GET(InpQ, QFld1) !~! PUT(InpQ) !~! DELETE(InpQ) !~! It saves defining a TYPEd queue in the global area when you usage ig going to be limited. JAT-HTH Printed November 21, 2024, 7:04 am This article has been viewed/printed 35254 times. Google search has resulted in 19 hits on this article since January 25, 2004. |