Scripting Bugs
Re: Scripting Bugs
A beta just in the right moment
Tested for my usecase (i.e. length=1) now the result is correct
Thanks a lot!
Tested for my usecase (i.e. length=1) now the result is correct
Thanks a lot!
Win11 Pro 223H2 Gerrman
Re: Scripting Bugs
The code below produces "20160430 20160429 20160428" instead of "20160430 20160430 20160430".
Code: Select all
msg "<date -1d yyyymmdd> <date -1d yyyymmdd> <date -1d yyyymmdd>";
Re: Scripting Bugs
I am leaning towards this one being a bug, since it is inconsistent with how things appear in other places...
Running this SCwhere <location> contains the following child folder structurethe dump that shows the subfolders' names lists them like soYet, once it goes on to dump contents of those subfolders, the listing is displayed in numerical order like soAlso, the list view shows them in numerical order, so I believe folderreport() should be fixed to show directory order in the expected manner.
Running this SC
Code: Select all
folderreport("dump", "file", "<location>", "r", "<destination>.txt");
Code: Select all
blah 1
blah 2
blah 3
blah 4
...
blah 9
blah 10
blah 11
blah 12
Code: Select all
blah 1
blah 10
blah 11
blah 12
blah 2
blah 3
...
Code: Select all
blah 1
<contents>
blah 2
<contents>
blah 3
<contents>
blah 4
...
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
-
- Site Admin
- Posts: 60609
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Scripting Bugs
dump: [Default] Classic directory dump.
This is expected to sort like this. Try DOS box dir command...
This is expected to sort like this. Try DOS box dir command...
FAQ | XY News RSS | XY Twitter
Re: Scripting Bugs
I get what you are saying, but this causes inconsistent results. The list does not show it that way and the order of sub-dir listings does not match the order of directories the dump produces. And you say "expected", but I did not expect it to be like this, hence the post...admin wrote:dump: [Default] Classic directory dump.
This is expected to sort like this. Try DOS box dir command...
Last edited by zer0 on 08 May 2016 19:26, edited 1 time in total.
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
Re: Scripting Bugs
I think they should give back the same:
but the latter one gives back nothing, that's why this is also empty:
Code: Select all
msg property("#date.modified","D:\Downloads");
msg property("#date.modified","D:\Downloads\");
Code: Select all
msg property("#date.m", gettoken(get("tree"),1,"|"));
Re: Scripting Bugs
This structure doesn't work:
I have to substitute the concatenation part with a new variable to make it work:
EDIT: Ok, I can see now, that the "." string concatenator has lower precedence, so I have to use brackets. However, it is weird. I have never had to use brackets in this situation. (for example vba: if "this" = "th" & "is" then debug.print "ok")
Code: Select all
if (tab("get","path") != "paper:" . $mbve_name) {
Code: Select all
if (tab("get","path") != $paperpath) {
Re: Scripting Bugs
Whoa. That's pretty unintuitive indeed. (*Suddenly recall all my broken ternaries* )
In fact, looking at the precedence list, I think dot should be here:
In fact, looking at the precedence list, I think dot should be here:
Code: Select all
┌─>
│ < <= > >= == != Comparison
│ [Un]Like[I] Comparison
│ && Boolean: AND
│ || Boolean: OR
│ And Boolean: AND
│ Xor Boolean: XOR
│ Or Boolean: OR
│ ? : Ternary
└─ . String concatenator
= Set
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Scripting Bugs
Thanks for the fix. Also, wouldn't it be better if both aliases for AND and OR had the same precedence?
(Regardless of PHP treating them differently)
Code: Select all
&& AND Boolean: AND
|| OR Boolean: OR
Xor Boolean: XOR
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]