Website and Help Typos
Re: Website and Help Typos
listpane command reads:
whatever list modes we will get int he future.
it should be:
whatever list modes we will get in the future.
don't know if this fits here, tho.
whatever list modes we will get int he future.
it should be:
whatever list modes we will get in the future.
don't know if this fits here, tho.
Power-hungry user!!!
Re: Website and Help Typos
apparently the namespace command isn't mentioned in the scripting ref at all?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Website and Help Typos
Yes, I made a note on this in the change log at v15.00.0313 - 2015-04-10 16:40.
This feature is officially still in experimental stage.
This feature is officially still in experimental stage.
FAQ | XY News RSS | XY Twitter
Re: Website and Help Typos
I don't think that this is true anymore. (And I am happy about that.) But the Help still contains it under the ForEach:
If ListOfTokens is nothing ("") the loop will still be executed one time with $variable set to nothing.
Re: Website and Help Typos
But you can control this by MsgOnEmpty:LittleBiG wrote:I don't think that this is true anymore. (And I am happy about that.) But the Help still contains it under the ForEach:If ListOfTokens is nothing ("") the loop will still be executed one time with $variable set to nothing.
In MsgOnEmpty you can state an error message for the case that ListOfTokens is empty. If MsgOnEmpty is given (even as empty string "") the loop will not be executed at all.
(But I didn't test it, though.)
Win11 Pro 223H2 Gerrman
Re: Website and Help Typos
The same true if it is not given. So what I quoted is obsolete.If MsgOnEmpty is given (even as empty string "") the loop will not be executed at all.
Re: Website and Help Typos
if I understand you correct I must say "no".LittleBiG wrote:The same true if it is not given. So what I quoted is obsolete.If MsgOnEmpty is given (even as empty string "") the loop will not be executed at all.
If MsgOnEmpty is not specified at all (i.e. neither "" nor "anything"), and ListOfTokens is empty, the loop is executed once, with $variable = "".
If MsgOnEmpty *is* specified and ListOfTokens is empty, the loop is *not* executed at all.
Win11 Pro 223H2 Gerrman
Re: Website and Help Typos
That's what I want to explain: if the ListOfToken is empty, it doesn't matter if you omit the MsgOnEmpty or set to "". The loop won't be executed at all, not even once. And this is the right way of working. I am just looking forward to the time when the help will reflect this.
Re: Website and Help Typos
LittleBiG is right, the docs need updated.
I don't recall the previous behavior and am too lazy to check but in v16.90.0102 the inner-block is never executed for an empty list ($list = ''). However, keep in mind that referencing an unset variable treats its name as a literal string. In which case the inner-block will be executed:
The 'e'/empty flag and MsgOnEmpty do not come into play here, as the list is technically not empty.
Further, MsgOnEmpty will only be shown when this is true:Which means the message will NOT be shown when the list is full of empty items, as seen here:
I don't recall the previous behavior and am too lazy to check but in v16.90.0102 the inner-block is never executed for an empty list ($list = ''). However, keep in mind that referencing an unset variable treats its name as a literal string. In which case the inner-block will be executed:
Code: Select all
Unset $list;
foreach($item, $list) {
// this will execute once with $item = '$list'
echo quote($item);
}
Further, MsgOnEmpty will only be shown when this is true:
Code: Select all
IsSet($list) && $list == ''
Code: Select all
$list = '|';
foreach($item, $list,, 'e', 'List is empty') {
// etc.
}
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Website and Help Typos
Thanks, will remove it.LittleBiG wrote:I don't think that this is true anymore. (And I am happy about that.) But the Help still contains it under the ForEach:If ListOfTokens is nothing ("") the loop will still be executed one time with $variable set to nothing.
FAQ | XY News RSS | XY Twitter
Re: Website and Help Typos
A very minor nit... on the web site for Custom Support which is located under the Custom heading on the XYplorer site, states, "You are a registered user who needs a customized script to tune up a specific workflow?" As worded, this is not a question. It's a statement. Should be "Are you a registered...?
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Website and Help Typos
OK, I thought this works in English (in German it does). Thanks.
FAQ | XY News RSS | XY Twitter
Re: Website and Help Typos
Scripting - Switch Statements
$beer = 'Kirin'; example
";" is wrong
$beer = 'Kirin'; example
Code: Select all
default;
One of my scripts helped you out? Please donate via Paypal