Subject Re: null value
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Thu, 16 Jun 2022 13:25:18 -0700
Newsgroups dbase.getting-started

On 6/16/2022 1:20 PM, Mustansir Ghor wrote:
> Dear Ken Sir
>
> I had a field with space values, so i had put the syntax in function to null them. But it remained to have spaces.

Are you sure? How are you checking? Is there something in the table
setup, for example, a MySQL table, where you have a default value of
spaces?

> Is there a difference between = and := when putting value to a fields?

:= is the assignment operator, and it avoids issues with typos, among
other things ... for example:

form.qfoot.rowset.fields["name"].val=null

Note that I left out the "ue" part of the keyword "value". The statement
above will create a property of the "name" field, called "val".

By using the assignment operator, if "val" doesn't exist, you will get
an error:

form.qfoot.rowset.fields["name"].val := null

It's a useful tool. And since "=" is used to compare values (although in
most cases I use "==" instead), it avoids confusion when looking at the
code.

Ken

--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm