Save command

Kenneth Brody kenb at fptech.com
Wed May 18 09:18:23 PDT 2011


On 5/18/2011 11:41 AM, flowersoft at compuserve.com wrote:
> So, I have many programs with code that, when adding new records, reads
> something like this:
>
> Then: input popup yn "Do You Want to Exit? (y/N) " default "N"
>    If: yn="Y"
> Then: delete; exit
>    If:
> Then: screen ,(@fd)
>
> Are you saying that I don't need the 'delete'?

If you want the last record to be deleted, rather than saved, you need the 
DELETE. What did I write that makes you believe I said otherwise?

> My experience has been that if I don't add a 'delete', blank records get
> created and saved to disk.
> Or are you saying that the 'exit' terminates the processing and the records
> gets added at that time?

Yes, EXIT ends the processing, and then exits.  If record changes are 
pending, they will be written, just as if processing ended some other way.

> However, the 'delete' is ahead of the 'exit' so what gets deleted if the
> record does not exist?

DELETE, without a lookup name, says "when processing ends, delete this 
record, rather than save it".

>> I took out line 5 ("close test"), but it doesn't trigger a freechain
>> rebuild.  (This is with dclerk 5.0.12DN9.)
>
> rclerk 5.0.14RN9  triggers a freechain every single time if the take 'close'
> out.

Well, it turns out that 5.0.12DN9 does trigger a freechain rebuild, but it 
does it so fast, I didn't see it unless I set PFBLDFREE=ON.

-- 
Kenneth Brody


More information about the Filepro-list mailing list