Why does this #IF not work?

Author: vfpmcp@mbsoftwaresolutions.com

Posted: 2004-06-04 at 08:43:20

I like to code in VFP8 and the app will eventually move to it, but for now, I have to compile in VFP6.

However, this #IF doesn't seem to work. Why not? Or better yet, is there an easier way to do this so that I can still have the code exist for inclusion when compiled later in VFP8?

Here's my code:

#IF val(left(VERSION(4),2)) > 6

llValid = .F.

DO WHILE !llValid AND !EMPTY(lcEmailAddr)

lcEmailAddr = INPUTBOX("The Report will be emailed to the address below. You can use this one, or type in a different address to use.","Email address for Report.",pcEmailAddr)

llValid = this.ValidEmail(lcEmailAddr) OR EMPTY(lcEmailAddr) && allow user to get out via empty email address

IF !llValid THEN

MESSAGEBOX("The email address should be in the form yourname@yourcompany.com' -- please correct and resubmit.",MB_ICONOK,"Invalid email address.")

ENDIF

ENDDO

#ENDIF

TIA!

--Michael

©2004 vfpmcp@mbsoftwaresolutions.com