Notes in Folder

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Notes in Folder

Post by highend »

I never said that
One of my scripts helped you out? Please donate via Paypal

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Notes in Folder

Post 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!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Notes in Folder

Post 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*
One of my scripts helped you out? Please donate via Paypal

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Notes in Folder

Post by SkyFrontier »

I'll consider those.
Thanks!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Notes in Folder

Post 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.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply