FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour syntax for passing variable as reference type
Posts: 110
Joined: Wed Feb 18, 2009 09:58 AM
syntax for passing variable as reference type
Posted: Wed Feb 25, 2009 08:02 AM

can some one clear my doubt.
syntax for passing variable as reference type
thanks in advance

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: syntax for passing variable as reference type
Posted: Wed Feb 25, 2009 08:08 AM
Dear Sajith,

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

Code (fw): Select all Collapse
@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
Posts: 110
Joined: Wed Feb 18, 2009 09:58 AM
Re: syntax for passing variable as reference type
Posted: Wed Feb 25, 2009 08:36 AM

thank u for ur Support
Regards
sajith :D

Continue the discussion