DOCERR: How to Use the ADEL() Command to Delete a Column

ID: Q126438

The information in this article applies to:

SUMMARY

This article describe how to use the ADEL(<array>,<expN>[,2]) command to delete Column Contents of an array.

MORE INFORMATION

The FoxPro Help file does not provide enough information about the second (<expN>) and the third (2) arguments in the ADEL() command. Also, there is no information or example for deleting the contents of an array column using the ADEL() command. This article illustrates the information about the ADEL() command that is missing from the FoxPro Help file documentation.

Syntax

ADEL(<array>,<expN>[,2])

Deletes an element from a one-dimensional array or a row or column from a two-dimensional array.

Arguments

<array> - Specifies the array from which the element, row, or column is

          deleted.

<expN> - Specifies the number of the element, row, or column to delete from
         the array. You must include the optional 2 argument to delete a
         column from the array.

2 -      Deletes the contents of a column from the array.

Example

x=ADIR(mylist) DISPLAY MEMORY LIKE mylist y=ADEL(mylist,5,2) DISPLAY MEMORY LIKE mylist

In this example, you create a array with five columns, and then display the array to the screen. Next, you delete the contents of the fifth column and it is filled with .F. as stated in the ADEL() topic of the FoxPro Help.

Additional reference words: FoxWin FoxDos FoxMac FoxUnix 2.60a KBCategory: kbprg kbcode kbdocerr KBSubcategory: FxprgGeneral

Last Reviewed: June 27, 1995