We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be good to be able to validate the parameters to a macro file at its start. See https://forum.duet3d.com/topic/32467/q-how-to-check-the-type-of-a-variable.
[DC] Some possibilities:
if typeof(param.D) = typeof(int)
if isInteger(param.D)]
We wouldn't need a isString function because any parameter can be converted to a string, but we would need functions to test most or all other types.
if typeof(param.D) = typeInt
if canConvert(param.D, typeInt)
This approach may be more useful because it will avoid the need to test for int and float separately.
The text was updated successfully, but these errors were encountered:
dc42
No branches or pull requests
Is your feature request related to a problem? Please describe.
It would be good to be able to validate the parameters to a macro file at its start. See https://forum.duet3d.com/topic/32467/q-how-to-check-the-type-of-a-variable.
Describe the solution you propose.
[DC] Some possibilities:
if typeof(param.D) = typeof(int)
if isInteger(param.D)]
We wouldn't need a isString function because any parameter can be converted to a string, but we would need functions to test most or all other types.
if typeof(param.D) = typeInt
if canConvert(param.D, typeInt)
This approach may be more useful because it will avoid the need to test for int and float separately.
The text was updated successfully, but these errors were encountered: