Page #57

Access(), Call(), Catalog(), CError(), Change(), Clear Screen, Close Printer, Completed(), Convert, DExport, DGen(), Display History, Id(), IsMarked(), List History, LkSys(), Network(), Protect, Reset, Run(), Set Catalog, Set DBTrap, Set Design, Set IBlock, Set Instruct, Set LdCheck, Set MBlock, Set Precision, Set SQL, Set Trap, User()

What these commands and functions have in common is that they're all listed in the VFP Help (one version or another) as unsupported and coming from dBase IV. However, they can actually be divided into three groups: those that give errors, those that are simply ignored but don't give errors, and those that actually do something.

The first group, the ones that generate errors, includes CALL(), CATALOG(), CERROR(), CONVERT, DEXPORT, DGEN(), ISMARKED(), LKSYS(), PROTECT, RESET, RUN() and USER(). If you're converting dBase code that uses these items, you'll have to change it to get it to run.

The next group is a lot more benign, though likely to need changes, too. These items run without error, but either do nothing or do nothing useful. The members of this group are ACCESS(), CHANGE(), CLEAR SCREEN, COMPLETED(), DISPLAY HISTORY, LIST HISTORY, NETWORK() and all the SET commands listed, except for SET MBLOCK. If you're counting on one of these commands to change something, or on one of these functions to return a meaningful value, think again. (Incidentally, all the SET commands here have SET() counterparts that always return their hard-coded values.) The exact behavior of each of these items is listed in Help (search for "Unsupported dBASE IV Commands, Functions, and Clauses"), so we won't get into it here.

Finally, three of these supposedly unsupported commands actually do something. CLOSE PRINTER is equivalent to SET PRINTER TO—that is, it turns off the printer and restores the default printer setting.

SET MBLOCK is a little more interesting. This is a cousin to FoxPro's SET BLOCKSIZE command. It lets you specify the size of the chunks allocated for memo fields. However, it works a little differently (albeit more simply). The number you specify is multiplied by 64 to give the blocksize. SET("MBLOCK") returns the current setting, in the same scale.

ID() may be the most intriguing of the bunch. It returns the machine identification, including information about the current user. Help says the second part is the network machine number or 1, if there's no network, but that's not what we're seeing. On Tamar's desk machine (which has a network card, but is not attached to a network), ID() returns "TAMAR'S DELL # Tamar", exactly the same thing as SYS(0).

Example

? SET("BLOCK")  && 64, by default ? SET("MBLOCK") && 1 SET MBLOCK TO 2 ? SET("BLOCK")  && 128

See Also

Set BlockSize, Set Printer


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net