02-04-2024, 03:26 PM
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
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