Page 2 of 2
Re: Notes in Folder
Posted: 20 May 2017 07:37
by highend
I never said that
Re: Notes in Folder
Posted: 20 May 2017 20:21
by SkyFrontier
@highend: Not that I'm disagreeing, but - I never needed a return for those load() ops, in fact it never occurred to me I could use it that way. Any other benefit I may gather from using it the way you suggested? Or the other way round... any harm by doing that way?
Thanks for the input!
Re: Notes in Folder
Posted: 23 May 2017 15:41
by highend
01. It assumes (for others) that they can call it like a function -> Script error
02. I know that it currently works but the only relevant source is the help file regarding syntax
If the support for it (if there is any

) is dropped -> More script errors *g*
Re: Notes in Folder
Posted: 25 May 2017 19:59
by SkyFrontier
I'll consider those.
Thanks!
Re: Notes in Folder
Posted: 26 May 2017 22:10
by bdeshi
I think you can actually write all current scripting COMMANDS as if they were FUNCTIONS -- maybe it has to do with historical syntax rules, I don't know -- but the fact is this syntax does not match scripting ref and is therefore discouraged.
For example,
Code: Select all
$a="B"; assert $a=="A", '$a has wrong value!';
$a="B"; assert($a=="A", '$a has wrong value!');
work the same (currently), but the official syntax is:
Code: Select all
assert condition, [message], [continue=0] // no braces!
So the second usage confuses newbies now, not to mention that it might fail more rigorous syntax checking in the future.