Page 1 of 1 1
Topic Options
#21582 - 2002-05-10 10:41 PM using UDF is script
j95661 Offline
Getting the hang of it

Registered: 2001-02-27
Posts: 84
Loc: sacramento,ca usa
I have seen some examples of UDF code for doing more advanced functions in Kix... But I cant find a doc on how to use this UDF code, where does it go. It looks like standard VB code.. can anyone point me to a doc.

gracias...
_________________________
WonderBoy Constantly learning everyday, how much I dont know :-)

Top
#21583 - 2002-05-10 10:49 PM Re: using UDF is script
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
In the FAQ forum:How to use UDFs

[ 10 May 2002, 22:51: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#21584 - 2002-05-10 11:09 PM Re: using UDF is script
New Mexico Mark Offline
Hey THIS is FUN
****

Registered: 2002-01-03
Posts: 223
Loc: Columbia, SC
Have you read the "Function" command section in the kix2001.doc file? That sums it up pretty well.

You could also look at some of the UDF's posted here and / or in http://www.scriptlogic.com/Kixtart/FunctionList.asp

Beyond that, just create a small script and a simple function like (untested code):

code:
function LastFirst ($strName)
; $strName is assumed to be a string with first
; middle (optional) and last names, and no
; punctuation, titles, or Jr, Sr, etc.
dim $Tmp, $Name, $i, $j
$Tmp = split($strName,' ')
$j = UBound($Tmp)
$LastFirst=$Tmp[$j]
$LastFirst=$LastFirst + ','
for $i = 0 TO ($j - 1)
$LastFirst=$LastFirst + ' '
$LastFirst=$LastFirst + $Tmp[$i]
next
endfunction

Silly example, but it would be something easy to play with. Just put that code into a text file. Then anywhere outside the function/endfunction boundaries, you could put:

code:
LastFirst('First MI. Last') ?

Run the script, and play with it until you are comfortable with how functions work. Maybe you could add an optional parameter to include a title.

New Mexico Mark

Top
#21585 - 2002-05-22 11:35 AM Re: using UDF is script
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We create on daily basis summary pages with UDFs from the "kixtart.org"
and "www.scriptlogic.com" site. Also the FAQ forum from this site is
transfered to summary page.

related addresses
On all HTML summary pages you have a direct link to interesting topic.
Based on this new input we have also update our program for creation
the right information for you. You can read now, which functions are
new or updated.

The Scriptlogic site has restyle the functionlib page. A very usefull
facility is:
scriptlogic can mail you all required function in KiXtart format
Example for Abs is:
code:
;--[   Function: Abs()    ]----------(last revised: 2001/12/11)-
;
;
;- Action:
;
; Mathematical absolute value.
;
;
;- Syntax:
;
; ABS (Expression)
;
;
;- Parameters:
;
; Expression (Required / String)
; a number or numerical expression.
;
;
;- Remarks:
;
; None
;
;
;- Returns:
;
; Returns the absolute value of the expression.
;
;
;- Example:
;
; $result=abs(-3)
;
; $x=10*10-145
; $result=abs($x)
;
;

function abs($Expr)
;returns the absolute value of a number
$Expr=0+$Expr
if $Expr<0
$Expr=-1*$Expr
endif
$abs=$Expr
endfunction

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

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 823 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.051 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

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