var with the same name as a param
-
If I call this macro:
var G = null if exists(param.L) set var.G = param.L var L = 1
using M98 there is no error, unless I include an L parameter, like L"TestParam", in which case the last line gets flagged as an error:
Error: in file macro line 5 column 8: meta command: variable 'L' already exists
I didn't expect this, since I assumed param.L would be different from var.L, and also, because global.L coexists fine with var.L. It also seems like global.L coexists fine with param.L.
Is it difficult to just make global.L, var.L and param.L 3 separate entities? It might be useful to document how this works once it's settled.
-
@DonStauffer are you running in standalone mode or with attached sBC?
-
@dc42 Standalone. Railcore.
-
@DonStauffer thanks for reporting this. It's not intended behaviour. I have created https://github.com/Duet3D/RepRapFirmware/issues/1003.