Path: utzoo!utgpu!water!watmath!clyde!bellcore!tness7!killer!netsys!cucstud!pvirgo
From: pvirgo@cucstud.UUCP (Paul Virgo)
Newsgroups: comp.databases
Subject: Re: dBASE III Plus questions
Summary: Sounds like a default sit to me
Message-ID: <250@cucstud.UUCP>
Date: 31 May 88 15:49:26 GMT
References: <1382@its63b.ed.ac.uk>
Organization: Columbia Union College; Takoma Park, MD 20912
Lines: 46

In article <1382@its63b.ed.ac.uk>, dougie@its63b.ed.ac.uk (Dougie Nisbet) writes:
> 
> A couple of queries; can anyone help or advise?
> 
> 2	A recurring problem I have, which is presumably experienced by
> 	others, is differentiating between BLANK or MISSING numeric data,
> 	and the valid possibility of the data being zero. dBASE seems to 
> 	be a bit inconsistent in the way it displays this type of data.
> 	i.e. It is possible to Append records to a file, and press
> 	 on numeric data fields, leaving the fields (apparently)
> 	blank. Typing LIST later, also seems to suggest that the fields 
> 	are blank, but typing LIST FIELDNAME (where FIELDNAME is a 
> 	numeric field), displays zero's (0's) for records which had
> 	previously appeared blank with a simple LIST command.
> 	Also, typing LIST FOR FIELDNAME = 0 will display the records which
> 	have numeric fields which *appear* to be blank, although dBASE 
> 	obviously treats them as zero.
> 
> 	How do people get around this problem? I know the most
> 	straighforward work-around is probably to use character fields - 
> 	but then you lose the automatic range checking facility which 
> 	is really useful.
> 
> Dougie


 Doug, if I am on the right track, you want to be able to know when data
 in your field is either blank or a true zero. First, I assume you do 
 command procedures and if you do, you notice that the numeric fields
 when shown on the screen default to zero. This is a feature that I 
 guess the Ashton-Tate people put in for their own belief that the're
 helping us, who knows?? Anyway, if you decide to use character fields
 but you want that great range checking try using the VAL function. This
 converts your string to a numeric value and thus allows you to use the
 range checking facility. It is available on most dBase III+ ver. If you
 are unsure of the syntax, here's an example:
 maccount is a string equaling : 1.27
 VAL(maccount) evaluates the string to a true number so you can use it
 in any mathematical equation. Personally, I feel(no, think) that dBase III+
 is able to evaluate whether a *zero* is typed in or whether the data value
 is a default. Can't quite say. If you have any questions I'm
 netsys!cucstud!pvirgo  Hope it helps.

 P.S. you running dBASE III+ on a PC or a micro?? 

		   MadVirgo and the dBASERS of the Future