#134495 - 2005-02-25 11:12 AM
Re: Call a sub
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
I'll give an exemple... Let's say a create a file called subs-funtions.kix, which contains sub1 and sub2. From my main kix file, I would like to be able to do something like this : call "subs-functions.kix, sub1".
Is UDF able to do that ?
Yes, it is - in fact it is superior to the method that you are suggesting.
Convert all your sub-routines to UDFs using Function/EndFunction and store in your file "subs-functions.kix"
At the start of your script, "CALL subs-functions.kix". This won't execute any code, but it will load your functions into memory ready to be executed when needed.
Now in your script you can call sub1() sub2() whenever you like because they have been loaded in memory - you don't need to call the "subs-functions.kix" file again.
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 661 anonymous users online.
|
|
|