Page 37 of 41
Re: Scripting Bugs
Posted: 19 Apr 2016 12:45
by admin
Yes, works like this.
Re: Scripting Bugs
Posted: 19 Apr 2016 12:45
by PeterH
Re: Scripting Bugs
Posted: 19 Apr 2016 14:44
by PeterH
A beta just in the right moment
Tested for my usecase (i.e. length=1)

now the result is correct
Thanks a lot!
Re: Scripting Bugs
Posted: 01 May 2016 07:51
by xman
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
Posted: 01 May 2016 09:33
by admin
Wow, thanks! Fix comes.
Re: Scripting Bugs
Posted: 07 May 2016 13:44
by zer0
I am leaning towards this one being a bug, since it is inconsistent with how things appear in other places...
Running this SC
Code: Select all
folderreport("dump", "file", "<location>", "r", "<destination>.txt");
where <location> contains the following child folder structure
Code: Select all
blah 1
blah 2
blah 3
blah 4
...
blah 9
blah 10
blah 11
blah 12
the dump that shows the subfolders' names lists them like so
Code: Select all
blah 1
blah 10
blah 11
blah 12
blah 2
blah 3
...
Yet, once it goes on to dump contents of those subfolders, the listing is displayed in numerical order like so
Code: Select all
blah 1
<contents>
blah 2
<contents>
blah 3
<contents>
blah 4
...
Also, the list view shows them in numerical order, so I believe folderreport() should be fixed to show directory order in the expected manner.
Re: Scripting Bugs
Posted: 07 May 2016 18:32
by admin
dump: [Default] Classic directory dump.
This is expected to sort like this. Try DOS box dir command...
Re: Scripting Bugs
Posted: 08 May 2016 12:50
by zer0
admin wrote:dump: [Default] Classic directory dump.
This is expected to sort like this. Try DOS box dir command...
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...
Re: Scripting Bugs
Posted: 08 May 2016 13:42
by admin
OK, convinced.

Change is coming...
Re: Scripting Bugs
Posted: 15 May 2016 16:46
by LittleBiG
I think they should give back the same:
Code: Select all
msg property("#date.modified","D:\Downloads");
msg property("#date.modified","D:\Downloads\");
but the latter one gives back nothing, that's why this is also empty:
Code: Select all
msg property("#date.m", gettoken(get("tree"),1,"|"));
Re: Scripting Bugs
Posted: 15 May 2016 16:58
by admin

D'accord!
Re: Scripting Bugs
Posted: 23 May 2016 10:11
by LittleBiG
This structure doesn't work:
Code: Select all
if (tab("get","path") != "paper:" . $mbve_name) {
I have to substitute the concatenation part with a new variable to make it work:
Code: Select all
if (tab("get","path") != $paperpath) {
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")
Re: Scripting Bugs
Posted: 23 May 2016 14:16
by bdeshi
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:
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
Re: Scripting Bugs
Posted: 25 May 2016 12:20
by admin
Holy moly!
Fix coming...
Re: Scripting Bugs
Posted: 25 May 2016 15:05
by bdeshi
Thanks for the fix. Also, wouldn't it be better if both aliases for AND and OR had the same precedence?
Code: Select all
&& AND Boolean: AND
|| OR Boolean: OR
Xor Boolean: XOR
(Regardless of PHP treating them differently)