Clearing An Array

To clear an array that has data in it, the data items should be replaced with nothing. If it is a numeric array, nothing is 0. If it is a string array, nothing is " ". Let's take BILL off the payroll and not replace him. Enter

To clear a lot of elements in an array, or the entire array, it would be better to use a loop. Use it to put nothing into each location.

Let's run a loop in the immediate mode to clear locations 4 and 5 of the array. Enter

FOR CL=4TO 5: NAME$(CL)=" ":NEXT GOTO 50 Only ART and CINDY are left.

0 0

Post a comment

  • Receive news updates via email from this site