Passing variables to user functions of Clipper functions 
Author Message
 Passing variables to user functions of Clipper functions

For a clipper function like achoice , if you use a user function, three variables
get passed automatically (mode etc). How can you add an array reference or a
additional variable of your own.



Tue, 29 Sep 1998 03:00:00 GMT  
 Passing variables to user functions of Clipper functions

Quote:
>For a clipper function like achoice , if you use a user function, three variables
>get passed automatically (mode etc). How can you add an array reference or a
>additional variable of your own.


The closest you can come is a STATIC(s) var in the prg with the
udf for the achoice.  Actually works quite well for some things.

Gary



Fri, 02 Oct 1998 03:00:00 GMT  
 Passing variables to user functions of Clipper functions

Quote:

>For a clipper function like achoice , if you use a user function, three variables
>get passed automatically (mode etc). How can you add an array reference or a
>additional variable of your own.

The simplest way is to make the array (or whatever variable it is that you
want to access) a file-wide static.  Then you put the user function in the
same .PRG and just access the variable.  Then changes are visible without
any work.  This does, however, preclude you from using the same code in a
nested fashion (having the ACHOICE() call another ACHOICE() that uses the
same user function, for example).

-- Clayton --

   Clayton Neff                           SAVID International
   Member of the "Gang of Four" liason group to CA.
   Member of the Technicon Steering Committee 1993-1994



Fri, 02 Oct 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Can We Pass Block from Function to Function?

2. math: passing function to function

3. F77-C: Passing Fortran FUNCTION as an argument for a C Function

4. Passing functions CONTAINed in a subroutine to other functions

5. Passing array valued functions as argument to function.

6. Common Lisp: passing a function to a function and applying it

7. How to pass stems to a user-defined function

8. How to pass stems to a user-defined function

9. Pass Group variable to external C Function

10. HELP: Passing parameters or Variables in Functions

11. I need to pass my variable into the subtract function

12. Passing compound variable contents to a function

 

 
Powered by phpBB® Forum Software