syntax for passing variable as reference type

syntax for passing variable as reference type

Postby sajith » Wed Feb 25, 2009 8:02 am

can some one clear my doubt.
syntax for passing variable as reference type
thanks in advance
sajith
 
Posts: 110
Joined: Wed Feb 18, 2009 9:58 am
Location: India

Re: syntax for passing variable as reference type

Postby anserkk » Wed Feb 25, 2009 8:08 am

Dear Sajith,

To pass a variable by reference you should use @ along with the variable. For eg

Code: Select all  Expand view
@10,10 BUTTON oBtn PROMPT "Save" ACTION MyFunc(@cName,@nAge,dDateOfBirth)

FUNCTION MyFunc(cName,nAge,dDateOfBirth)  
.....
RETURN NIL


The first 2 variables are passed by reference and the last one is passed by value

Hope it is clear to you

Regards

Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: syntax for passing variable as reference type

Postby sajith » Wed Feb 25, 2009 8:36 am

thank u for ur Support
Regards
sajith :D
sajith
 
Posts: 110
Joined: Wed Feb 18, 2009 9:58 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 83 guests