Should I indicate no input arguments to a function?
古いコメントを表示
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 件のコメント
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Function Creation についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!