Website and Help Typos

Things you’d like to miss in the future...
Forum rules
When reporting a bug, please include the following information: your XYplorer version (e.g., v27.90.0047), your Windows version (e.g., Win 11), and your screen scaling percentage (e.g., 125%). We recommend adding your Windows version and screen scaling percentage to your profile or signature. This will make debugging much easier for us.
admin
Site Admin
Posts: 64838
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Website and Help Typos

Post by admin »

:tup:

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Website and Help Typos

Post by tiago »

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.
Power-hungry user!!!

admin
Site Admin
Posts: 64838
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Website and Help Typos

Post by admin »

:tup:

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Website and Help Typos

Post by bdeshi »

apparently the namespace command isn't mentioned in the scripting ref at all?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 64838
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Website and Help Typos

Post by admin »

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.

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Website and Help Typos

Post by LittleBiG »

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.

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Website and Help Typos

Post by PeterH »

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.
But you can control this by MsgOnEmpty:
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.)

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Website and Help Typos

Post by LittleBiG »

If MsgOnEmpty is given (even as empty string "") the loop will not be executed at all.
The same true if it is not given. So what I quoted is obsolete.

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Website and Help Typos

Post by PeterH »

LittleBiG wrote:
If MsgOnEmpty is given (even as empty string "") the loop will not be executed at all.
The same true if it is not given. So what I quoted is obsolete.
if I understand you correct I must say "no".

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.

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Website and Help Typos

Post by LittleBiG »

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.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Website and Help Typos

Post by TheQwerty »

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:

Code: Select all

Unset $list;
foreach($item, $list) {
  // this will execute once with $item = '$list'
  echo quote($item);
}
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:

Code: Select all

IsSet($list) && $list == ''
Which means the message will NOT be shown when the list is full of empty items, as seen here:

Code: Select all

$list = '|';
foreach($item, $list,, 'e', 'List is empty') {
  // etc.
}

admin
Site Admin
Posts: 64838
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Website and Help Typos

Post by admin »

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.
Thanks, will remove it.

klownboy
Posts: 4397
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440

Re: Website and Help Typos

Post by klownboy »

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...?

admin
Site Admin
Posts: 64838
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Website and Help Typos

Post by admin »

OK, I thought this works in English (in German it does). Thanks.

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

Re: Website and Help Typos

Post by highend »

Scripting - Switch Statements
$beer = 'Kirin'; example

Code: Select all

default;
";" is wrong
One of my scripts helped you out? Please donate via Paypal

Post Reply