I'm writing a program, in which one of the arguments is always a decimal between 0 and 1. Here's some reproducible code showing my issue. Please direct me to how I can correct this code to allow for float (or double) arguments.
cap program drop test
program define test
syntax, f(numeric)
di `f'
end
test, f(.05)
This code throws the invalid syntax error code.
I've also tried switching numeric to float or double. If I change the type to str, it works but produces a string. Thanks in advance for the help.
cap program drop test
program define test
syntax, f(numeric)
di `f'
end
test, f(.05)
This code throws the invalid syntax error code.
I've also tried switching numeric to float or double. If I change the type to str, it works but produces a string. Thanks in advance for the help.
Comment