none
What is correct syntax

Answers

  • Both of them would be the same. Adding extra parentheses doesn't change the value. Preferred syntax however is:

    if Empty( m.x )

    If it were not varread() -which returns a character value- then, depending on your needs and where you need it, preferred syntax could be:

    empty( nvl( m.x, '' ) )

    m.x == ''

    etc.

    • Marked as answer by YiChun Chen Thursday, December 10, 2009 8:47 AM
    Wednesday, December 09, 2009 12:41 PM
  • VARREAD() is a function that is there only for backward compatibility. Check the keypress event instead. Also the LASTKEY() funtion, though I would advice storing the last key in the keypress event. And as Cetin said, All these functions return numeric values.
    • Marked as answer by YiChun Chen Thursday, December 10, 2009 8:47 AM
    Wednesday, December 09, 2009 3:36 PM

All replies

  • correct syntax 

    x=varr()

    if empt(x)

    ...
    endi

    Please "Mark as Answer" if this post answered your question. :)

    Kalpesh Chhatrala | Software Developer | Rajkot | India

    Kalpesh's Blog
    Wednesday, December 09, 2009 6:09 AM
    Answerer
  • Thanks Kalpesh,
    varr() has numric value
    I want to know the value of varr() whether it is empty or not.
    Wednesday, December 09, 2009 6:45 AM
  • Both of them would be the same. Adding extra parentheses doesn't change the value. Preferred syntax however is:

    if Empty( m.x )

    If it were not varread() -which returns a character value- then, depending on your needs and where you need it, preferred syntax could be:

    empty( nvl( m.x, '' ) )

    m.x == ''

    etc.

    • Marked as answer by YiChun Chen Thursday, December 10, 2009 8:47 AM
    Wednesday, December 09, 2009 12:41 PM
  • Thanks Kalpesh,
    varr() has numric value
    I want to know the value of varr() whether it is empty or not.
    In which language varr() has a numeric value?

    Wednesday, December 09, 2009 12:42 PM
  • vfp9

    I have created array myarray

    dime myarray(3)

    controlsource of three texbox are myarray(1),myarray(2),myarray(3) respectively

    When user move one textbox to another, I want to know the value of varr()
    Wednesday, December 09, 2009 3:16 PM
  • VARREAD() is a function that is there only for backward compatibility. Check the keypress event instead. Also the LASTKEY() funtion, though I would advice storing the last key in the keypress event. And as Cetin said, All these functions return numeric values.
    • Marked as answer by YiChun Chen Thursday, December 10, 2009 8:47 AM
    Wednesday, December 09, 2009 3:36 PM