matlab-to-julia
matlab-to-julia copied to clipboard
Translating functions with variable number of arguments
In MatLab I found code of the type:
function[x, y]=foo(a,b,c)
if nargin < 3
# do something
end
if nargin < 2
# do another thing
end
end
I think this should be translated into Julia by:
function foo(args...)
if length(args) <3
# more code
return x,y
end
But the automatic translator mantains ´if nargin < ´.
Yes, I noticed this as well. Translator now just ignores when it does not understand something. This can be enhanced.