Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CLEAR command
#20
You know it would sure save a lot of coding if CLEAR could be repurposed to work similar to CLOSE. Using CLOSE would close all opened files and CLOSE 3 would only close the opened file #3.  

In the same fashion, rather than a multiple lines of code to reset an array or variable, it seems it may be handy to just CLEAR a, meaning to clear just the value held in the variable a but not cause  2nd variable a to exist. Same with an array..CLEAR a(14) would just clear the values held in those 15 indices and not cause a 2nd array with the same name and scope.

 I will admit, the coding to reset a variable to zero is rather simple  a = 0 and gets a little more complex to reset say 10 variables in a subroutine 

Sub Rset
a=0
AuntFanny =0
x3 =0
FunnyAsk =0
z2z =0
End Sub

Wouldn't it be nice if CLEAR would just do ....CLEAR a,AuntFanny,x3,FunnyAsk,z2z ...without any of the overhead you guys are pointing out as a legacy with CLEAR
Reply


Messages In This Thread
CLEAR command - by bartok - 02-02-2024, 10:13 PM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 02:53 AM
RE: CLEAR command - by bartok - 02-03-2024, 09:52 AM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 04:35 PM
RE: CLEAR command - by bartok - 02-03-2024, 09:11 PM
RE: CLEAR command - by bartok - 02-03-2024, 02:48 PM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 04:29 PM
RE: CLEAR command - by bartok - 02-03-2024, 06:26 PM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 05:22 PM
RE: CLEAR command - by bartok - 02-03-2024, 06:16 PM
RE: CLEAR command - by SMcNeill - 02-03-2024, 06:32 PM
RE: CLEAR command - by bartok - 02-03-2024, 08:20 PM
RE: CLEAR command - by SMcNeill - 02-03-2024, 10:24 PM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 10:55 PM
RE: CLEAR command - by bartok - 02-04-2024, 09:56 AM
RE: CLEAR command - by bplus - 02-03-2024, 06:41 PM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 06:48 PM
RE: CLEAR command - by SMcNeill - 02-04-2024, 12:17 PM
RE: CLEAR command - by bartok - 02-04-2024, 01:13 PM
RE: CLEAR command - by Dimster - 02-04-2024, 03:26 PM
RE: CLEAR command - by bplus - 02-04-2024, 04:16 PM



Users browsing this thread: 4 Guest(s)