Skip to content
New issue

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

level 0 function should end their name with an exclamation point (!) #13

Open
femtotrader opened this issue Oct 3, 2016 · 1 comment

Comments

@femtotrader
Copy link
Owner

According http://docs.julialang.org/en/release-0.5/stdlib/base/#introduction

By convention, function names ending with an exclamation point (!) modify their arguments. Some functions have both modifying (e.g., sort!) and non-modifying (sort) versions.

level 0 functions modify arguments so it may be a better idea to end their name with an exclamation point (!)

@femtotrader
Copy link
Owner Author

femtotrader commented Aug 22, 2017

https://github.com/femtotrader/TALib.jl/blob/master/src/ta_func_api_gen_level0.jl#L63

funcname = "_TA_" * string(symb_func)

->

funcname = "_TA_" * string(symb_func) * "!"

https://github.com/femtotrader/TALib.jl/blob/master/src/ta_func_api_gen_level1.jl#L134

s *= INDENT * "ret_code = _TA_$funcname($params_lv0)"

->

s *= INDENT * "ret_code = _TA_$funcname!($params_lv0)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant