about private var

Post Reply
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

about private var

Post by ShumingWang »

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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

My suggestion is to never, ever, use privates.

James
Post Reply