Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verify email address
Message
From
01/05/2012 07:03:26
 
 
To
01/05/2012 06:56:07
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01542899
Message ID:
01542978
Views:
67
>>>
>>>Function ValidEmail
>>>   Lparameters lcMail
>>>   Local ox, llReturn    <<<<<<---------------------------------------------- 
>>>   If Pcount() > 0 And Vartype(lcMail) = [C]
>>>      ox = Createobject([VBScript.RegExp])
>>>      ox.Pattern = "^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$"
>>>      ox.IgnoreCase = .T.
>>>      ox.Global = .F.
>>>      llReturn = ox.Test(lcMail)
>>>      Release ox
>>>      ox = .Null.
>>>   Endif
>>>Return llReturn
>>>
>>>
>>
>>Dangerous code. If ox happens to be a private variable on entry of the function, it will set its value to null
>isn't oX declared LOCAL? so it should not interfere with a higher sciped variable called oX???

It is no longer LOCAL once you release it
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform