D DPaul Active Member Licensed User Longtime User Jul 12, 2017 #1 Hi, This is not really a bug , but an aid for lazy programmers.... Look at this sub: sub mySub(a as string, b as string) Dim ................ Dim .................. Dim ................. Dim x , y, z, a, f as string ..code......... end sub You call a sub, with arguments a and b But , for some forgotten reason, a is also dimmed in the sub; now you end up with "error evaluating..." and no value for a. (The "error evaluating" only shows if you insert a breakpoint, and check a) b4a might give a warning in the log section, it took me 5 minutes of testing before i found that DPaul
Hi, This is not really a bug , but an aid for lazy programmers.... Look at this sub: sub mySub(a as string, b as string) Dim ................ Dim .................. Dim ................. Dim x , y, z, a, f as string ..code......... end sub You call a sub, with arguments a and b But , for some forgotten reason, a is also dimmed in the sub; now you end up with "error evaluating..." and no value for a. (The "error evaluating" only shows if you insert a breakpoint, and check a) b4a might give a warning in the log section, it took me 5 minutes of testing before i found that DPaul
Erel B4X founder Staff member Licensed User Longtime User Jul 12, 2017 #2 This is not a bug. You are allowed to redim the parameter.