Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

.NULL. or null

.NULL. or null

.NULL. or null

What is the difference between .NULL. and null when intending to add null to a property

For instance should I use


store .NULL. to obj.parameter 



store null to obj.parameter 

RE: .NULL. or null

There is no difference.

Originally, certain keywords were required to be surrounded by dots, but at some point that requirement went away. NULL is one example of that. Others include AND, OR and NOT.

So just use whichever form you prefer.


Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: .NULL. or null

Thanks Mike.
Have a good weekend


RE: .NULL. or null


Bear in mind that the Properties window treats null and .null. differently: a property initialized as .null. is set to .NULL., whereas a property initialized as null or NULL or Null is set to a string ("null", "NULL", or "Null", ...). To use the dotless notation, you have to prepend the property value with an equal sign (that is, = null).

RE: .NULL. or null

Good point, atlopes.

To round this up: VFP still needs dots for .T. and .F., obviously, while you can use null in code, t and f would be interpreted as variable or workarea or field names, especially f. As null was introduced as a synonym for .NULL. they didn't made the same step for true and false, though.

Because of these details I would opt to still write .NULL. anywhere you mean that boolean special value, except that the ISNULL() function can't be addressed as IS.NULL.(), of course.

I don't apply that rule of thumb to still use the dots with .AND. and .OR. and use the normal AND/OR operators, even though you can use AND and OR as variable names! While the dots around them make it expressively boolean operators and not names of variables, workareas or anything else, there's no problem to identify what's meant. Even though you can have a variable AND=42, the code IF foo=bar AND AND=42 still will work out fine and there is no way the AND in the middle of the IF expression is mistaken for the variable or the variable after it is mistaken for the boolean AND operator. It's the context/semantics that make it clear what each AND in that IF expression means, no need for dots. I'm sure someone can come up with some example where that would matter, but another rule of thumb therefore is to not use keywords as names of anything. Simply to not confuse yourself when reading the code.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close