John E. Davis wrote:
I think that a cleaner approach would be to use array_map:array_map (Void_Type, &autoload, ["buffer_compress", "spaces2tab", "format_table","goto_max_column", "format_table_rect"], "M:\\jed\\libjmr\\csvutils.sl"); --John
It took me 5 minutes to understand the above ;)
At least now I know about array_map.
It is OK to add such constructs to ini.sl since it is automatically
generated. But to use it for autoloading multiple macros in a
manually managed file is IMO not such a good idea since a casual
SLang programmer will have difficulties understandnig what it
does.
I think the above is also slower than
...
loop(5) { file; autoload(); }
and I don't see an easy way to make autoloads() with array_map.
Could autoload() be modified to accept multiple macros?
Marko
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.