Scripting Bugs

Things you’d like to miss in the future...
admin
Site Admin
Posts: 60560
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Scripting Bugs

Post by admin »

Yes, works like this.

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

Re: Scripting Bugs

Post by PeterH »

:tup: :tup: :tup:
Win11 Pro 223H2 Gerrman

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

Re: Scripting Bugs

Post by PeterH »

A beta just in the right moment :D

Tested for my usecase (i.e. length=1) :arrow: now the result is correct :appl:

Thanks a lot!
Win11 Pro 223H2 Gerrman

xman
Posts: 133
Joined: 28 Nov 2009 22:57

Re: Scripting Bugs

Post 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>";

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

Re: Scripting Bugs

Post by admin »

Wow, thanks! Fix comes.

zer0
Posts: 2673
Joined: 19 Jan 2009 20:11

Re: Scripting Bugs

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

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

Re: Scripting Bugs

Post by admin »

dump: [Default] Classic directory dump.

This is expected to sort like this. Try DOS box dir command...

zer0
Posts: 2673
Joined: 19 Jan 2009 20:11

Re: Scripting Bugs

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

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

Re: Scripting Bugs

Post by admin »

OK, convinced. :tup: Change is coming...

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

Re: Scripting Bugs

Post 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,"|"));

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

Re: Scripting Bugs

Post by admin »

:tup: D'accord!

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

Re: Scripting Bugs

Post 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")

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

Re: Scripting Bugs

Post by bdeshi »

Whoa. That's pretty unintuitive indeed. (*Suddenly recall all my broken ternaries* :kidding: )
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 ]

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

Re: Scripting Bugs

Post by admin »

Holy moly! :shock:

Fix coming...

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

Re: Scripting Bugs

Post 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)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply