Dear Forum,
I've found that for commands (e.g. IniRead) the OutputVar parameter must be simple / regular. It means that as OutputVar I must not use object types (e.g. linear array or associative array etc.). This issue was discussed in this topic. This isn't true for functions. So I see here advantage / disadvantage if commands are compared to functions.
My suggestions to documentation:
General:
Mention about this trait when difference between functions and commands are described: here and here.
Specific:
Mention about this trait in each specific command description, in OutputVar section, e.g. in description of IniRead command.
Kind regards, mslonik
Command parameters must be simple / regular
Command parameters must be simple / regular
My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey
Re: Command parameters must be simple / regular
jftr, currently, there is a (short) mention here - re "forcing an expression":
https://www.autohotkey.com/docs/Variables.htm#Expressions wrote:Force an expression: An expression can be used in a parameter that does not directly support it (except OutputVar parameters) by preceding the expression with a percent sign and a space or tab. In [v1.1.21+], this prefix can be used in the InputVar parameters of all commands except the traditional IF commands (use If (expression) instead). This technique is often used to access arrays.
Re: Command parameters must be simple / regular
Also, the second place you suggested for an addendum already contains this information - even in a special 'note' box:
https://www.autohotkey.com/docs/Language.htm#outputvar-and-inputvar-parameters wrote:Note: Only a plain variable can be used as an OutputVar. Array elements, properties and other expressions are not supported.
Re: Command parameters must be simple / regular
Yes, you're right. True, it's mentioned. Then I suggest to close this topic.
Kind regards, mslonik
Kind regards, mslonik
My scripts on this forum: Hotstrings Diacritic O T A G L E
Please become my patreon: Patreon
Written in AutoHotkey text replacement tool: Hotstrings.technology
Courses on AutoHotkey