Website and Help Typos

Things you’d like to miss in the future...
klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Website and Help Typos

Post by klownboy »

:tup: If it has spaces around the " | ", I suppose if it has spaces around item(s) except for the first and last item.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Website and Help Typos

Post by admin »

Yes. That's why I used "respectively." I'm still surprised that this does not work in English. But hey, you learn every day.

Gandolf

Re: Website and Help Typos

Post by Gandolf »

It's grammatically incorrect because you haven't mentioned the items already, it has to refer back to items already mentioned.

Oxford Dictionary of English.
respectively:
separately or individually and in the order already mentioned (used when enumerating two or more items or facts that refer back to a previous statement). e.g. they received sentences of one year and eight months respectively.

Yes, I'm still here!!

highend
Posts: 13311
Joined: 06 Feb 2011 00:33

Re: Website and Help Typos

Post by highend »

I have to praise god every day just because German is such an easy language^^
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Website and Help Typos

Post by klownboy »

Apples and oranges are both fruit, their color typically red and orange respectively.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Website and Help Typos

Post by admin »

Gandolf wrote:It's grammatically incorrect because you haven't mentioned the items already, it has to refer back to items already mentioned.

Oxford Dictionary of English.
respectively:
separately or individually and in the order already mentioned (used when enumerating two or more items or facts that refer back to a previous statement). e.g. they received sentences of one year and eight months respectively.

Yes, I'm still here!!
Wow, so grammar is the bait to lure you out of your cave! (Gasp, I hope this was close to English.)

Thanks for the explanation. Looks like I used "respectively" wrong all my live. I will try to avoid the word in future. :)

Gandolf

Re: Website and Help Typos

Post by Gandolf »

My two brothers were both English teachers, a Headmaster and head of department respectively. I didn't get a chance to use incorrect English!

Back to the cave.
Last edited by Gandolf on 04 May 2016 06:22, edited 1 time in total.

highend
Posts: 13311
Joined: 06 Feb 2011 00:33

Re: Website and Help Typos

Post by highend »

Advanced Topics - Scripting Commands Reference - tab()

"get"...

data:

[empty or missing] the index of the current tab (first tab = 1).

This one looks weird in the .chm file. Screenshot attached. Regardless of how wide I make the help file

More important (still for "get"):

index: unused

This isn't unused?

Code: Select all

text tab("get", "data", 3);
Returns the unresolved path for the 3rd index
Attachments
Unbenannt.png
Unbenannt.png (3.04 KiB) Viewed 2469 times
One of my scripts helped you out? Please donate via Paypal

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

Re: Website and Help Typos

Post by admin »

Some minutes too late, but thanks. :)

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Website and Help Typos

Post by PeterH »

Formatting error in help:

gettokenindex(), flag c: :arrow: misses an empty line to separate, and must be tabbed 1 pos to the right. (Like i: and w: are.)
(As it is now, I just missed it :whistle: )

Edit: the rest WAS misinterpretation :!:
Oh - and [flags=iw] is missing the c, too.

:shock: (from interpreting the examples!)
I don't think the combination of flags is OK as defined here! If I understand it right:
"w" interprets wildcards defined in token (i.e. if token = "value*")
"" uses token exact as is (in token = "value*" the * is not a wildcard?)
missing flags-operand interprets token as *token* (use "generic" wildcards)
:arrow: but how to differentiate the last 2 versions, if flags = "i" :?:

Or do I misinterprete the examples?
Last edited by PeterH on 20 Feb 2016 16:05, edited 1 time in total.
Win11 Pro 223H2 Gerrman

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Website and Help Typos

Post by klownboy »

Hi PeterH, I thought I had the rules for this one down, but maybe not. What do you mean by?
PeterH wrote:missing flags-operand interprets token as *token* (use "generic" wildcards)
- If the "w" flag is included and yet the scripter does not include any wildcard in his token, it will be interpreted as a generic *token* wildcard each side.
- If the "w" flag is included and the token has a wildcard, the token (with wildcard) is used as written.
- If the "w" is not included the token is treated literally no wildcards.
- If the "i' flag is used, it's treated totally independent of the above.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Website and Help Typos

Post by PeterH »

There are 2 examples in Help:

Code: Select all

  echo gettokenindex("red", "Blue;12|Red;15|Green;28"); //2 (*red*)
  echo gettokenindex("red", "Blue;12|Red;15|Green;28", , ""); //0 (red)
1) token "red" seems to be used generic as "*red*" - so entry "Red;15" is found
2) token "red" is used exact as is - so no return found
Win11 Pro 223H2 Gerrman

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: Website and Help Typos

Post by klownboy »

OK, I see what you mean in those 2 examples.

- In example 1, Don should not have used the * on each end of the token red (*red*). Since in this example, the "w" flag was not used, the interpretation should be (red) and it's not case sensitive (the default even though the "i" is not specified). The generic *token* is only used when the "w" flag is used, but no wildcard is specified. The answer is correct as 2 though.

- In example 2, I assume the default is "i" (case insensitive) even though the help doesn't say it. So you shouldn't have to have an the ''i" specified as a flag if that's what you want. If you quote nothing, it's taken to mean case sensitive which seems a bit different from the typical ways to specify case sensitivity. Again the answer for this example, if the above is true, is correct.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

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

Re: Website and Help Typos

Post by bdeshi »

Code: Select all

echo gettokenindex("red", "Blue;12|Red;15|Green;28"); //2 (*red*)
PeterH wrote:1) token "red" seems to be used generic as "*red*" - so entry "Red;15" is found
klownboy wrote:In example 1, Don should not have used the * on each end of the token red (*red*). Since in this example, the "w" flag was not used
the default value of the flag parameter is given as "iw", therefore the return is indeed correct.
gettokenindex ref wrote:gettokenindex(token, tokenlist, [separator=|], [flags=iw]);
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Website and Help Typos

Post by bdeshi »

> peterH: Oh - and [flags=iw] is missing the c, too.
- Because "c" isn't in part of the default value.

> "w" interprets wildcards defined in token (i.e. if token = "value*")
- Yes.

Code: Select all

 echo gettokenindex("Red*", "Blue;12|*Red*|Red;15|Red*|Green;28",,'w'); //3 ( Red* == Red;15 != *Red* )
> "" uses token exact as is (in token = "value*" the * is not a wildcard?)
- No the * isn't a wilcard in this case.

Code: Select all

 echo gettokenindex("red*", "Blue;12|Red;15|Red*|red*|Green;28",,''); //4 ( 'red*' != 'Red*' )
 echo gettokenindex("red*", "Blue;12|Red;15|red*|Green;28",,'i'); //3 ( 'red*' == 'Red*' )
> missing flags-operand interprets token as *token* (use "generic" wildcards)
- Yes, because of "iw" default value.

> :arrow: but how to differentiate the last 2 versions, if flags = "i" :?:

Code: Select all

echo gettokenindex("*Red*", "Blue;12|__Red;15__|*Red*|Green;28",,'iw'); //2 ( *red* == *Red* )
echo gettokenindex("*Red*", "Blue;12|__Red;15__|*Red*|Green;28",,'i'); //3 ( '*red*' )
so, been away from XYplorer for a while? :wink:

[edited] - examples, formatting
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply