These commands control the display of messages from various record-processing commands.
SET TALK ON | OFF
SET TALK WINDOW [ WindowName ] | NOWINDOW
cOnOrOff = SET( "TALK" )
cNoWindow = SET( "TALK", 1 )
cOnOrOff = SYS( 103 )
SET ODOMETER TO [ nRecords ]
nRecords = SET( "ODOMETER" )
A whole bunch of commands that can process bunches of records (like REPLACE, DELETE, COUNT, and so forth) provide feedback by showing how many records they've processed. When you're working interactively, this feedback is a big help. In applications, it can provide a very basic kind of "user pacifier." However, other feedback (like the record number a LOCATE lands on) is never welcome in an application. All of this output is controlled by SET TALK
. Normally, you'll turn it OFF in an application, though you might turn it on briefly to keep the user from rebooting while performing a long process. (Of course, an attractive progress bar is a much better choice and there are plenty of ActiveX progress bars to choose from.)
When TALK is on, if you're dealing with enough records and your machine is slow or you watch carefully, you can see the number of records processed accumulating. By default, FoxPro counts by hundreds. SET ODOMETER
controls that setting. Set it to a higher number and there's less frequent output; set it lower and you get updated more often. In Windows, where screen updates are much slower than record processing, it pays to SET ODOMETER
as high as you can stand it, if you're going to keep TALK on. SET ODOMETER
TO without a number resets it to the default.
SET ODOMETER TO 500
SET TALK ON