` Code template to call a procedure (Arnor Baldvinsson) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Templates: Code template to call a procedure
1999-03-01 -- Arnor Baldvinsson
 
Newsgroups: TopSpeed.Topic.Suggestions Editors note: Please note that some lines may wrap in the template code. Hi Craig, On Mon, 01 Mar 1999 10:37:23 EST, Craig E Ransom wrote: >When in the Embed Tree and I wish to insert a PROCEDURE at an embed >point, I would like to have another line that would permit me to >optionally specify parameters for that procedure, just as you now do >when I specify "Call a Procedure" from the Actions for a Button. This one seems to be internal. It's not found in any of the templates, but I find it in the C5Gen.dll. Here is something I just threw together: #Template(CodeTemplates,'Code templates'),FAMILY('CW20'),FAMILY('ABC') #!------------------------------------------------------------------- #! Posted on Topspeed.Topic.Suggestions on March 1st, 1999 #! By Arnor Baldvinsson, Denmark (arnorbld@post3.tele.dk) #! This template may be distributed freely #! #!------------------------------------------------------------------- #! Call a procedure optioinally with parameters and/or return value #! and allows starting a procedure with parameters. #!------------------------------------------------------------------- #! #Code(CallAProcedure,'Call a procedure') #PROMPT('Procedure to call:',PROCEDURE),%ProcedureToCall #PROMPT('Parameters:',@S255),%ProcedureToCallParameters #PROMPT('Assign return value:',FIELD),%ProcedureToCallReturnValue #PROMPT('Initiate thread',CHECK),%ProcedureToCallStart #ENABLE(%ProcedureToCallStart) #PROMPT('Thread Stack',@n6),%ProcedureToCallStack,DEFAULT(25000) #ENDENABLE #IF(%ProcedureToCallParameters) #IF(%ProcedureToCallReturnValue) %ProcedureToCallReturnValue = %ProcedureToCall %ProcedureToCallParameters #ELSE #IF(%ProcedureToCallStart) Start(%ProcedureToCall, %ProcedureToCallStack, %ProcedureToCallParameters) #ELSE %ProcedureToCall %ProcedureToCallParameters #END #END #ELSE #IF(%ProcedureToCallReturnValue) %ProcedureToCallReturnValue = %ProcedureToCall #ELSE #IF(%ProcedureToCallStart) Start(%ProcedureToCall, %ProcedureToCallStack) #ELSE %ProcedureToCall #END #END #END Best regards, Arnor Baldvinsson


Today is November 21, 2024, 4:01 am
This article has been viewed 35195 times.
Google search has resulted in 9 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: