Page 11 of 28

Re: Website and Help Typos

Posted: 28 Apr 2016 15:54
by admin
:tup:

Re: Website and Help Typos

Posted: 28 Apr 2016 15:58
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.

Re: Website and Help Typos

Posted: 28 Apr 2016 19:04
by admin
:tup:

Re: Website and Help Typos

Posted: 02 May 2016 09:18
by bdeshi
apparently the namespace command isn't mentioned in the scripting ref at all?

Re: Website and Help Typos

Posted: 02 May 2016 09:26
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.

Re: Website and Help Typos

Posted: 07 Jun 2016 11:37
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.

Re: Website and Help Typos

Posted: 07 Jun 2016 12:05
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.)

Re: Website and Help Typos

Posted: 07 Jun 2016 12:26
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.

Re: Website and Help Typos

Posted: 07 Jun 2016 14:16
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.

Re: Website and Help Typos

Posted: 07 Jun 2016 14:48
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.

Re: Website and Help Typos

Posted: 07 Jun 2016 15:07
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.
}

Re: Website and Help Typos

Posted: 11 Jun 2016 11:20
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.

Re: Website and Help Typos

Posted: 14 Jul 2016 23:05
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...?

Re: Website and Help Typos

Posted: 14 Jul 2016 23:14
by admin
OK, I thought this works in English (in German it does). Thanks.

Re: Website and Help Typos

Posted: 28 Nov 2016 08:04
by highend
Scripting - Switch Statements
$beer = 'Kirin'; example

Code: Select all

default;
";" is wrong