home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-21 | 18.0 KB | 1,123 lines |
- .de }n
- .bp
- .sp .5i
- ..
- .wh -.8i }n
- .sp .5i
- .po -.4i
- .ll 7.5i
- .ps 9
- .vs 9
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_AADDITION() Add elements unique of source array to target array
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_AADDITION()
- Add elements unique of source array to target array
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_AADDITION( <aList1>, <aList2> [, <lTrimmer> [, <lCaseSens> ] ] ) ;
- .in 1.04i
- \fB-> aNewArray
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<aList1>\fR is the primary array\.
- .sp
- \fB<aList2>\fR is the secondary array\.
- .sp
- \fB<lTrimmer>\fR is a logical value denoting whether leading or
- .in 1.04i
- trailing spaces should be included in the
- comparison\. If \.T\., then ignores spaces in
- comparison, defaults to \.T\., \.F\. includes spaces\.
- .sp
- .in 0.4i
- \fB<lCaseSens>\fR is a logical value denoting case sensitivity\.
- .in 1.04i
- If \.T\., then comparison is sensitive to case,
- defaults to \.T\., \.F\. ignores case\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- An array of the union of aList1 and aList2\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function will add the elements unique of aList2 with aList1\.
- It returns a new array including all the elements of aList1
- plus the unique elements of aList2\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .br
- aList1 := {"apple", "orange", "pear"}
- .br
- aList2 := {"apple ", "banana", "PEAR"}
- .sp
- .br
- FT_AADDITION( aList1, aList2 )
- .in 0.8i
- .br
- // ignores spaces, sensitive to case
- .br
- // returns {"apple","orange","pear","banana","PEAR"}
- .sp
- .in 0.4i
- .br
- FT_AADDITION( aList1, aList2, , \.F\. )
- .in 0.8i
- .br
- // ignores spaces, not sensitive to case
- .br
- // returns {"apple","orange","pear","banana"}
- .sp
- .in 0.4i
- .br
- FT_AADDITION( aList1, aList2, \.F\., \.F\. )
- .in 0.8i
- .br
- // sensitive to spaces, not sensitive to case
- .br
- // returns {"apple","orange","pear","apple ","banana"}
- .sp
- .in 0.08i
- \fBSource:\fR AADING\.PRG
- .sp
- .ta 1.84i
- \fBAuthor:\fR Ralph Oliver, TRANSCOM SYSTEMS
- .br
- .ta
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_AAVG() Average numeric values in an array
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_AAVG()
- Average numeric values in an array
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_AAVG( <aArray> [, <nStartIndex> [, <nEndIndex> ] ] ) -> nAverage
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<aArray>\fR is the array containing the elements to be averaged\.
- .sp
- \fB<nStartIndex>\fR is the first array item to include,
- defaults to first element\.
- .sp
- \fB<nEndIndex>\fR is the last array element to include,
- defaults to all elements\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- The average of the specified array elements\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function is used to get a numeric average of selected or all
- elements of an array\.
- .sp
- This routine requires FT_ASUM()\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .ta 2.32i
- FT_AAVG(aSubTotals) // Get Average of Entire Array
- .br
- .ta
- .sp
- .ta 2.32i
- FT_AAVG(aSubTotals, 5) // Get Average of 5th Element On
- .br
- .ta
- .sp
- .ta 2.32i
- FT_AAVG(aSubTotals, , 10) // Get Average of 1st 10 Elements
- .br
- .ta
- .sp
- .ta 2.32i
- FT_AAVG(aSubTotals, 5, 10) // Get Average of Elements 5-10
- .br
- .ta
- .sp
- .in 0.08i
- \fBSource:\fR AAVG\.PRG
- .sp
- \fBAuthor:\fR David Husnian
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_ADESSORT() Sort an array in descending order
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_ADESSORT()
- Sort an array in descending order
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_ADESSORT( <aArray> [, <nStartIndex> [, <nEndIndex> ] ] ) -> aSorted
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<aArray>\fR is the array to be sorted
- .sp
- \fB<nStartIndex>\fR is the first array item to include in the sort,
- defaults to first element
- .sp
- \fB<nEndIndex>\fR is the last array element to include in the sort,
- defaults to all elements
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- The array, sorted in descending order\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function is used to sort an array in descending order, i\.e\., Z-A
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .ta 2.72i
- FT_ADESSORT(aNames) // Sort the Entire Array
- .br
- .ta
- .sp
- .ta 2.72i
- FT_ADESSORT(aNames, 5) // Sort from the 5th Element On
- .br
- .ta
- .sp
- .ta 2.72i
- FT_ADESSORT(aNames, , 10) // Sort the 1st 10 Elements
- .br
- .ta
- .sp
- .ta 2.72i
- FT_ADESSORT(aNames, 5, 10) // Sort Elements 5-10
- .br
- .ta
- .sp
- .in 0.08i
- \fBSource:\fR ADESSORT\.PRG
- .sp
- \fBAuthor:\fR David Husnian
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_AEMAXLEN() Find longest element within an array
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_AEMAXLEN()
- Find longest element within an array
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_AEMAXLEN( <aArray> [, <nDimension> [, <nStart> [, <nCount> ] ] ] ) ;
- .in 1.28i
- \fB-> nMaxlen
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<aArray>\fR is the array containing the elements to be measured\.
- .sp
- \fB<nDimension>\fR is the array dimension to be measured,
- .in 1.28i
- defaults to first dimension\.
- .sp
- .in 0.4i
- \fB<nStart>\fR is the starting array element to include,
- .in 1.28i
- defaults to first array element\.
- .sp
- .in 0.4i
- \fB<nCount>\fR is the number of array elements to process from
- .in 1.28i
- from \fB<nStart>\fR, defaults to remaining elements
- in array\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- The length of the longest size element of an array\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function will measure each element of an array
- dimension and return the longest element\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .ta 2.08i
- FT_AEMAXLEN(aArray) // Measure the 1st dimension of an Array
- .br
- .ta
- .sp
- .ta 2.08i
- FT_AEMAXLEN(aArray,2) // Measure the 2nd dimension of an Array
- .br
- .ta
- .sp
- .ta 2.08i
- FT_AEMAXLEN(aArray,2,,9) // Measure Elements 1-9 of the
- .br
- .ta
- .in 2.96i
- 2nd dimension or subarray
- .sp
- .in 0.4i
- FT_AEMAXLEN(aArray,3,5,9) // Measure Elements 5-9 of the
- .in 2.96i
- 3rd dimension or subarray
- .sp
- .in 0.4i
- .ta 2.08i
- FT_AEMAXLEN(aArray,3,5) // Measure Elements 5 to last in the
- .br
- .ta
- .in 2.96i
- 3rd dimension or subarray
- .sp
- .in 0.08i
- \fBSource:\fR AEMAXLEN\.PRG
- .sp
- .ta 1.84i
- \fBAuthor:\fR Ralph Oliver, TRANSCOM SYSTEMS
- .br
- .ta
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_AEMINLEN()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_AEMINLEN() Find shortest element within an array
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_AEMINLEN()
- Find shortest element within an array
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_AEMINLEN( <aArray> [, <nDimension> [, <nStart> [, <nCount> ] ] ] )
- .in 1.28i
- \fB-> nMinlen
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<aArray>\fR is the array containing the elements to be measured\.
- .sp
- \fB<nDimension>\fR is the array dimension to be measured,
- .in 1.28i
- defaults to first dimension\.
- .sp
- .in 0.4i
- \fB<nStart>\fR is the starting array element to include,
- .in 1.28i
- defaults to first array element\.
- .sp
- .in 0.4i
- \fB<nCount>\fR is the number of array elements to process from
- .in 1.28i
- from \fB<nStart>\fR, defaults to remaining elements
- in array\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- The length of the shortest size element of an array\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function will measure each element of an array
- dimension and return the shortest element\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .ta 2.08i
- FT_AEMINLEN(aArray) // Measure the 1st dimension of an Array
- .br
- .ta
- .sp
- .ta 2.08i
- FT_AEMINLEN(aArray,2) // Measure the 2nd dimension of an Array
- .br
- .ta
- .sp
- .ta 2.08i
- FT_AEMINLEN(aArray,2,,9) // Measure Elements 1-9 of 2nd dimension
- .br
- .ta
- .sp
- FT_AEMINLEN(aArray,3,5,9) // Measure Elements 5-9 of 3rd dimension
- .sp
- .ta 2.08i
- FT_AEMINLEN(aArray,3,5) // Measure Elements 5 to end of 3rd dimension
- .br
- .ta
- .sp
- .in 0.08i
- \fBSource:\fR AEMINLEN\.PRG
- .sp
- .ta 1.84i
- \fBAuthor:\fR Ralph Oliver, TRANSCOM SYSTEMS
- .br
- .ta
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_AEMAXLEN()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_AMEDIAN() Find middle value in array, or average of two middle values
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_AMEDIAN()
- Find middle value in array, or average of two middle values
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_AMEDIAN( <aArray> [, <nStart> [, <nEnd> ] ] )
- .in 1.28i
- \fB-> nMedian
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<aArray>\fR is the array containing the elements to be averaged\.
- .sp
- \fB<nStart>\fR is the first array element to include,
- defaults to first element\.
- .sp
- \fB<nEnd>\fR is the last array element to include,
- defaults to last element\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- The median average of the array elements
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function sorts the elements of a numeric array and
- then returns the value in the middle element of the sorted
- array\. If there is no exact middle value, then it returns
- the average of the two middle values\. Half of the elements
- are > median and half are < median\. A median average may
- more reflect a more useful average when there are extreme
- values in the set\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .ta 2.08i
- FT_AMEDIAN( aArray ) // Return Median for entire array
- .br
- .ta
- .sp
- .ta 2.08i
- FT_AMEDIAN( aArray, 2) // Return Median for elements from 2 to end
- .br
- .ta
- .sp
- .ta 2.08i
- FT_AMEDIAN( aArray, ,9) // Return Median for 1st 9 elements
- .br
- .ta
- .sp
- FT_AMEDIAN( aArray,8,40 ) // Return Median for elements 8 to 40
- .sp
- .in 0.08i
- \fBSource:\fR AMEDIAN\.PRG
- .sp
- .ta 1.84i
- \fBAuthor:\fR Ralph Oliver, TRANSCOM SYSTEMS
- .br
- .ta
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_ANOMATCHES() Find the number of array elements meeting a condition
- .br
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_ANOMATCHES()
- Find the number of array elements meeting a condition
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_ANOMATCHES( <aArray>, <bCompareBlock> ;
- .in 1.6i
- \fB[, <nStartIndex> [, <nEndIndex> ] ] ) -> nNoOfMatches
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<aArray>\fR is the array to be searched
- .sp
- \fB<bCompareBlock>\fR is a code block containing the expression for
- the array elements to be tested with\. Each element is passed
- as a parameter to the block\. If the block returns \.T\., the
- number of matches will be incremented by one\.
- .sp
- \fB<nStartIndex>\fR is the first array item to include in the search,
- defaults to first element\.
- .sp
- \fB<nEndIndex>\fR is the last array element to include in the search,
- defaults to all elements\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- The number of elements that cause the code block to return \.T\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function returns the number of array elements that, when passed
- to the supplied code block, cause that code block to return a \.T\. value\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.4i
- .br
- // Search the Entire Array
- .br
- FT_ANOMATCHES(aTries, { | x | x <= 100 } )
- .sp
- .br
- // Search from the 5th Element On
- .br
- FT_ANOMATCHES(aCodes, { | x | UPPER(x) == cCurrentCode }, 5)
- .sp
- .br
- // Search the 1st 10 Elements
- .br
- FT_ANOMATCHES(aDates, { | x | IS_BETWEEN(DATE()-7,x,DATE() + 7) }, 10)
- .sp
- .br
- // Search Elements 5-10
- .br
- FT_ANOMATCHES(aNames, { | x | x <= cLastGoodName }, 5, 10)
- .sp
- .in 0.08i
- \fBSource:\fR ANOMATCH\.PRG
- .sp
- \fBAuthor:\fR David Husnian
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_AREDIT() 2 dimensional array editing function using TBrowse
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_AREDIT()
- 2 dimensional array editing function using TBrowse
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_AREDIT( <nTop>, <nLeft>, <nBottom>, <nRight>, <Array Name>, ;
- .in 0.64i
- \fB<nElem>, <aHeadings>, <aBlocks> [, <bGetFunc> ] ) -> xElement
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<nTop>\fR, \fB<nLeft>\fR, \fB<nBottom>\fR, \fB<nRight>\fR are coordinates for TBrowse
- .sp
- \fB<Array Name>\fR is name of 2 dimensional to array edit
- .sp
- .ta 1.04i
- \fB<nElem>\fR is pointer for element in array
- .br
- .ta
- .sp
- .ta 1.04i
- \fB<aHeadings>\fR is array of column headings
- .br
- .ta
- .sp
- .ta 1.04i
- \fB<aBlocks>\fR is array of blocks describing each array element
- .br
- .ta
- .sp
- [ \fB<bGetFunc>\fR ] is get editing function for handling individual elements
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- Value of element positioned on when exit FT_AREDIT()
- The type of this value depends on what is displayed\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function allows you to position yourself in an array,
- add and delete rows with the <F7> and <F8> keys,
- and pass a UDF with information to edit the individual gets\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.48i
- FT_AREDIT(3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks)
- .sp
- This example will allow you to browse a 2 dimensional array
- But you can\'t edit it since there is no GetBlock UDF
- It allows the user to hit ENTER to select an element or ESC to
- return 0
- .sp
- .br
- * This second example shows how to edit a 2 dimensional array
- .br
- * as might be done to edit an invoice
- .sp
- .in 0.96i
- .br
- LOCAL i, ar[3, 26], aBlocks[3], aHeadings[3]
- .br
- LOCAL nElem := 1, bGetFunc
- .sp
- .in 0.48i
- .br
- * Set up two dimensional array "ar"
- .sp
- .in 0.96i
- .br
- FOR i = 1 TO 26
- .in 1.2i
- .ta 1.84i 2.16i 2.4i 2.72i 3.04i
- .br
- ar[1, i] := i // 1 -> 26 Numeric
- .br
- .ta
- .ta 1.84i 3.04i
- .br
- ar[2, i] := CHR(i+64) // "A" -> "Z" Character
- .br
- .ta
- .ta 1.84i 3.04i
- .br
- ar[3, i] := CHR(91-i) // "Z" -> "A" Character
- .br
- .ta
- .in 1.04i
- .br
- NEXT i
- .sp
- .in 0.48i
- .br
- * SET UP aHeadings Array for column headings
- .sp
- .in 0.96i
- .ta 0.88i
- .br
- aHeadings := { "Numbers", "Letters", "Reverse" }
- .br
- .ta
- .sp
- .in 0.48i
- .br
- * Need to set up individual array blocks for each TBrowse column
- .sp
- .in 0.64i
- .br
- aBlocks[1] := {|| STR(ar[1, nElem], 2) } // prevent default 10 spaces
- .br
- aBlocks[2] := {|| ar[2, nElem] }
- .br
- aBlocks[3] := {|| ar[3, nElem] }
- .sp
- .in 0.48i
- .br
- * set up TestGet() as the passed Get Function so FT_ArEdit knows how
- .br
- * to edit the individual gets\.
- .sp
- .in 0.64i
- .ta 0.88i
- .br
- bGetFunc := { | b, ar, nDim, nElem | TestGet(b, ar, nDim, nElem) }
- .br
- .ta
- .br
- SetColor( "N/W, W/N, , , W/N" )
- .br
- CLEAR SCREEN
- .br
- FT_AREDIT(3, 5, 18, 75, ar, @nElem, aHeadings, aBlocks, bGetFunc)
- .sp
- .sp
- .in 0.08i
- \fBSource:\fR AREDIT\.PRG
- .sp
- \fBAuthor:\fR James J\. Orlowski, M\.D\.
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_ASUM() Sum the elements of an array
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_ASUM()
- Sum the elements of an array
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_ASUM( <aArray> [, <nStartIndex> [, <nEndIndex> ] ] ) -> nSum
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<aArray>\fR is the array containing the elements to be summed\.
- .sp
- \fB<nStartIndex>\fR is the first array item to include,
- defaults to first element\.
- .sp
- \fB<nEndIndex>\fR is the last array element to include,
- defaults to all elements\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- The sum of the elements of the array or the lengths of the elements\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- This function is to sum the elements of a numeric array or to sum the
- lengths of a character array\.
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .sp
- .in 0.4i
- .ta 2.72i
- FT_ASUM(aSubTotals) // Sum the Entire Array
- .br
- .ta
- .sp
- .ta 2.72i
- FT_ASUM(aSubTotals, 5) // Sum from the 5th Element On
- .br
- .ta
- .sp
- .ta 2.72i
- FT_ASUM(aSubTotals, , 10) // Sum the 1st 10 Elements
- .br
- .ta
- .sp
- .ta 2.72i
- FT_ASUM(aSubTotals, 5, 10) // Sum Elements 5-10
- .br
- .ta
- .sp
- .in 0.08i
- \fBSource:\fR ASUM\.PRG
- .sp
- \fBAuthor:\fR David Husnian
- .in 0i
- .ta 1.63265i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_RESTARR() Restore a Clipper array from a disc file
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_RESTARR()
- Restore a Clipper array from a disc file
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_RESTARR( <cFileName>, <nErrorCode> ) -> aArray
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<cFileName>\fR is a DOS file name\.
- .sp
- \fB<nErrorCode>\fR will return any DOS file error\.
- .sp
- All arguments are required\.
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- Return an array variable\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- FT_RESTARR() restores an array which was saved to
- a disc file using FT_SAVEARR()\.
- .sp
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .br
- aArray := { {\'Invoice 1\',CTOD(\'04/15/91\'),1234\.32,\.T\.},;
- .in 1.28i
- .br
- {\'Invoice 2\',DATE(),234\.98,\.F\.},;
- .ta 2.56i
- .br
- {\'Invoice 3\',DATE() + 1,0,\.T\.} }
- .br
- .ta
- .in 0.32i
- .br
- nErrorCode := 0
- .br
- FT_SAVEARR(aArray,\'INVOICE\.DAT\',@nErrorCode)
- .br
- IF nErrorCode = 0
- .in 0.48i
- .br
- aSave := FT_RESTARR(\'INVOICE\.DAT\',@nErrorCode)
- .br
- IF nErrorCode # 0
- .in 0.72i
- .br
- ? \'Error restoring array\'
- .in 0.48i
- .br
- ENDIF
- .in 0.32i
- .br
- ELSE
- .in 0.48i
- .br
- ? \'Error writing array\'
- .in 0.32i
- .br
- ENDIF
- .sp
- .sp
- .in 0.08i
- \fBSource:\fR SAVEARR\.PRG
- .sp
- \fBAuthor:\fR David Barrett
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_SAVEARR()
- .ta 1.63265i
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- FT_SAVEARR() Save Clipper array to a disc file\.
- .br
- .ta
- .in 0.08i
- .ps -3
- .vs -3
- .sp 2
- \fBFT_SAVEARR()
- Save Clipper array to a disc file\.
- .in 0i
- .br
- \l'6.24i'
- .br
- .sp
- .in 0.08i
- \fBSyntax
- .sp
- .in 0.4i
- \fBFT_SAVEARR( <aArray>, <cFileName>, <nErrorCode> ) -> lRet
- .sp
- .in 0.08i
- \fBArguments
- .sp
- .in 0.4i
- \fB<aArray>\fR is any Clipper array except those containing
- compiled code blocks\.
- .sp
- \fB<cFileName>\fR is a DOS file name\.
- .sp
- \fB<nErrorCode>\fR will return any DOS file error\.
- .sp
- All arguments are required\.
- .sp
- .sp
- .in 0.08i
- \fBReturns
- .sp
- .in 0.4i
- \.F\. if there was a DOS file error or the array contained
- code blocks, otherwise returns \.T\.
- .sp
- .in 0.08i
- \fBDescription
- .sp
- .in 0.4i
- FT_SAVEARR() saves any Clipper array, except those
- containing compiled code blocks, to a disc file\. The
- array can be restored from the disc file using
- FT_RESTARR()\.
- .sp
- .sp
- .in 0.08i
- \fBExamples
- .sp
- .in 0.32i
- .br
- aArray := { {\'Invoice 1\',CTOD(\'04/15/91\'),1234\.32,\.T\.},;
- .in 1.28i
- .br
- {\'Invoice 2\',DATE(),234\.98,\.F\.},;
- .ta 2.56i
- .br
- {\'Invoice 3\',DATE() + 1,0,\.T\.} }
- .br
- .ta
- .in 0.32i
- .br
- nErrorCode := 0
- .br
- FT_SAVEARR(aArray,\'INVOICE\.DAT\',@nErrorCode)
- .br
- IF nErrorCode = 0
- .in 0.48i
- .br
- aSave := FT_RESTARR(\'INVOICE\.DAT\',@nErrorCode)
- .br
- IF nErrorCode # 0
- .in 0.72i
- .br
- ? \'Error restoring array\'
- .in 0.48i
- .br
- ENDIF
- .in 0.32i
- .br
- ELSE
- .in 0.48i
- .br
- ? \'Error writing array\'
- .in 0.32i
- .br
- ENDIF
- .sp
- .sp
- .in 0.08i
- \fBSource:\fR SAVEARR\.PRG
- .sp
- \fBAuthor:\fR David Barrett
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- FT_RESTARR()
-