Closed carlos-montiers closed 5 years ago
It might be possible for other extensions to have options after non-options, but not for @say
, as it combines all its remaining arguments to make the message (and no, I won't be changing that).
I not understand why combine all the remaining arguments, it uses malloc. Why not ever use as text the last argument ? Also I have doubts about the number of times malloc is called, maybe we can have memory leaks, because a new call to say will overwrite the text allocated pointer.
call @say one two
is two arguments combined into a single one two
string. malloc
is called once, as a new call to say will wait for a previous call to finish before doing anything (that's what WaitForSingleObject
does).
Currently, the call extensions only accept options as the first argument.
For example this works:
call @say /N Hello
but this not works:
call @say Hello /N
Thus, my question is: the caller extensions will only accept options as the first argument ? Or the option parameter can support be indicated in any place ?
This is not only a question about the SAY extension, is for define the way of this for the future caller extensions.