about private var

about private var

Postby ShumingWang » Wed Apr 05, 2006 2:32 am

Hi,

function main()
private var1,var2,var3

var1:=123
fun1()
...
var2:=oserver:query("select ..")
fun2()
...
var3:= TXBrowse():New( odlg )
fun3()
return


function fun1()
private var1
var1:=0.1
...
return

function fun2()
private var2
var2:=oserver:query("select ..")
...
var2:end()
return

function fun3()
private var3
var3:= TXBrowse():New( odlg )
...
return


It seems , date,number,string variables like var1 does not cause prolems
but objects like var2,var3 cause problems.
Are these right ?

Best regards
Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Postby James Bott » Thu Apr 06, 2006 3:30 pm

My suggestion is to never, ever, use privates.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

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