Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link 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
Today is November 21, 2024, 6:54 am This article has been viewed 35254 times. Google search has resulted in 19 hits on this article since January 25, 2004.
|
|