Page 1 of 1 1
Topic Options
#169198 - 2006-10-11 01:47 PM Function
krex Offline
Fresh Scripter

Registered: 2006-03-02
Posts: 39
Hi!
How to a pass a variable to a function a then get it back in a variable. hope it makes sense...?
Code:

$user = "Peter"
$RF = NewName($user)
? $rf
Function NewName($thename)
$thename = $thename+"Gordon"
EndFunction



And it should display Petergordon

Top
#169199 - 2006-10-11 01:52 PM Re: Function
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Hi krex,
is this what you are looking for?
Code:

$user = "Peter"
$RF = NewName($user)
? $rf
Function NewName($thename)
$NewName = $thename+"Gordon"
EndFunction

_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#169200 - 2006-10-11 02:15 PM Re: Function
krex Offline
Fresh Scripter

Registered: 2006-03-02
Posts: 39
Can't se the different, but now it works so i am happy.
Thanks!

Top
#169201 - 2006-10-11 02:20 PM Re: Function
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
note the variable name inside the function;
its the same name as the function.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#169202 - 2006-10-11 03:19 PM Re: Function
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Hey krex,

are you the same krex as on kforg ?
This might shed a bit light on the subject : How to use UDFs and How to write UDFs
_________________________



Top
#169203 - 2006-10-12 09:36 AM Re: Function
krex Offline
Fresh Scripter

Registered: 2006-03-02
Posts: 39
Hi Jochen!
If kforg is kixforms yes if kforg is something else nope?
Thanks for the links

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 931 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.056 seconds in which 0.027 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