Page 1 of 1 1
Topic Options
#174750 - 2007-03-19 02:56 PM import a UDF?
Granville Offline
Lurker

Registered: 2007-03-19
Posts: 2
Hi folks,
Im new to Kixtart and am looking for a little tip here.

I have a rather long function declared in a script. I would like to keep the script nice and tidy by declaring the script in another file. Is there an easy way to import a UDF from another script?

Cheers,

Paul

Top
#174751 - 2007-03-19 03:04 PM Re: import a UDF? [Re: Granville]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Hi and welcome to the board.

You can put your function in a separate file and call it from the main script like this.

 Code:
call @SCRIPTDIR + "\functions\somefunction.kix"


After you called the function you can use it just like any other function that is embedded in kixtart.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#174752 - 2007-03-19 05:40 PM Re: import a UDF? [Re: Mart]
Granville Offline
Lurker

Registered: 2007-03-19
Posts: 2
Many thanks! \:\)
Top
#174753 - 2007-03-19 06:33 PM Re: import a UDF? [Re: Granville]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If tokenizing, look also at INCLUDE.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.067 seconds in which 0.039 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org