Should I indicate no input arguments to a function?
Ältere Kommentare anzeigen
Suppose I have a function which requires no inputs. Should I indicate it with parentheses () or leave it naked? Both cases work, but is there a convention in the MATLAB community?
Example:
someFunction
% do sth
end
vs
someFunction()
% do sth
end
1 Kommentar
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Function Creation finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!