Реферат: Task for the laboratory work

The scope clauses are: ALL, NEXT <expN>, RECORD <expN>, and REST. These are explained in the Overview of the FoxPro Language chapter in the FoxPro Language Reference. Commands which include <scope> operate only on the table/.DBF in the active work area.

You can specify a scope of records copied to a file. Only the records that fall within the range of records specified by the scope are copied.

The default scope for COPY TO is ALL records.

FOR <expL1>

If the FOR <expL1> clause is included, only the records for which the logical condition <expL1> evaluates to true (.T.) are copied to the file. Include FOR <expL1> to conditionally copy records, filtering out undesired records.

Rushmore optimizes COPY TO with a FOR <expL1> clause if <expL1> is an optimizable expression. For best performance, use an optimizable expression in the FOR <expL1> clause. A discussion of Rushmore optimizable expressions appears in the Optimizing Your Application chapter in the FoxPro Developer's Guide.

WHILE <expL2>

If WHILE <expL2> is included, records are copied as long as the logical expression <expL2> evaluates to true (.T.).

[WITH] CDX | [WITH] PRODUCTION

If the table/.DBF you copy from has a structural index file, you can create a structural index file for the new table/.DBF. Including CDX or PRODUCTION creates an identical structural index file for the new table/.DBF. The tags and index expressions from the original structural index file are copied to the new structural index file. The CDX and PRODUCTION clauses have the same effect.

Do not include CDX or PRODUCTION if you are copying to a file other than a new FoxPro table/.DBF.

NOOPTIMIZE

Include NOOPTIMIZE to cause Rushmore to not optimize COPY TO. For more information, see SET OPTIMIZE or consult the discussion of Rushmore optimization in the Optimizing Your Application chapter in the FoxPro Developer's Guide.

TYPE

If the file you are creating isn't a FoxPro table/.DBF, you must specify its file type. Although you must specify a file type, you need not include the key word TYPE. You can create a wide variety of different file types including DELIMITED ASCII text files in which you can specify a field delimiter.

FOXPLUS

FoxPro memo files have a different structure than FoxBASE+ memo files. If your source FoxPro table/.DBF contains a memo field, include the FOXPLUS clause to create a table/.DBF that can be used in FoxBASE+. The FoxPro memo field cannot contain binary data because FoxBASE+ does not support binary data in memo fields.

SDF

An SDF (System Data Format) file is an ASCII text file in which records have a fixed length and end with a carriage return and line feed. Fields aren't delimited. The SDF file name is assigned a .TXT file extension if you do not include an extension.

SYLK

A SYLK file is a Symbolic Link interchange format (used in Microsoft MultiPlan) in which fields from the FoxPro table/.DBF become columns in the spreadsheet and records become rows. SYLK file names have no extension.

DELIMITED [WITH <delimiter> | WITH BLANK | WITH TAB]

A DELIMITED file is an ASCII text file in which each record ends with a carriage return and line feed. The default field separator is a comma. Since character data may include commas, character fields are additionally delimited with double quotation marks.

In the following example there are 2 character fields ("Smith" and "TELEPHONE") delimited with double quotation marks. There is one numeric field which is not delimited since numeric data does not contain commas. The 3 fields are separated with commas.

"Smith", 9999999, "TELEPHONE"

The DELIMITED WITH <delimiter> option can be used to replace the double quotation marks with one of your choice.

The comma is not truly a delimiter. However, the DELIMITED WITH BLANK or DELIMITED WITH TAB clauses allow you to replace the comma field separator with either a space or a tab. The data should not contain embedded spaces or tabs.

You cannot combine the WITH <delimiter> clause with either the WITH BLANK or WITH TAB clauses.

Unless you specify otherwise, a .TXT extension is assigned to all newly created DELIMITED files.

К-во Просмотров: 466
Бесплатно скачать Реферат: Task for the laboratory work