Issue with ⍎ that worked fine in APLWIN and APLX
Posted: Tue Nov 21, 2017 2:10 pm
Hello,
I'm hoping someone has an idea about this. I have a simple piece of code that ran fine in WINAPL and APLX, but doesn't in Dyalog. The code extracts date information, (yyyymmdd, e.g., 20170910), from a character matrix and converts it to numeric, but I get a rank error in Dyalog. The code is: ⍎STATS[(1↑⍴STATS);cDATE]. The 1↑⍴STATS is going to give me the last row of the table, and cDATE is simply the columns 1 2 3 4 5 6 7 8, so I would get the latest date in character format, such as 20170910, and then convert this to a number, but this fails with a rank error.
I did find that the error is because the shape of STATS[(1↑⍴STATS);cDATE] evaluates to 1 8 and Dyalog doesn't like this. However, it also evaluated to 1 8 in APLWIN and APLX, but I did not get this rank error. Is there a setting in Dyalog to get around this error or am I going to have to resolve the error adding the ravel operator like this: ⍎,STATS[(1↑⍴STATS);cDATE] ?
Thanks & Regards,
Lance
I'm hoping someone has an idea about this. I have a simple piece of code that ran fine in WINAPL and APLX, but doesn't in Dyalog. The code extracts date information, (yyyymmdd, e.g., 20170910), from a character matrix and converts it to numeric, but I get a rank error in Dyalog. The code is: ⍎STATS[(1↑⍴STATS);cDATE]. The 1↑⍴STATS is going to give me the last row of the table, and cDATE is simply the columns 1 2 3 4 5 6 7 8, so I would get the latest date in character format, such as 20170910, and then convert this to a number, but this fails with a rank error.
I did find that the error is because the shape of STATS[(1↑⍴STATS);cDATE] evaluates to 1 8 and Dyalog doesn't like this. However, it also evaluated to 1 8 in APLWIN and APLX, but I did not get this rank error. Is there a setting in Dyalog to get around this error or am I going to have to resolve the error adding the ravel operator like this: ⍎,STATS[(1↑⍴STATS);cDATE] ?
Thanks & Regards,
Lance