trouble with ragged nested array

If we don't know about 'em, we can't fix 'em.

trouble with ragged nested array

PostPosted by drab » Sun Apr 16, 2017 5:53 pm

Try this ...

v←0 1⍴¨'2'
v←v,⊂v
w←'0',¨¨v
⎕av⍳∊w
49 51 49 49 51 1 1

where did those 1's come from?
drab
 
Posts: 283
Joined: Thu Oct 09, 2014 6:23 am

Re: trouble with ragged nested array

PostPosted by forummaster » Mon Apr 17, 2017 4:03 pm

drab wrote:Try this ...

v←0 1⍴¨'2'
v←v,⊂v
w←'0',¨¨v
⎕av⍳∊w
49 51 49 49 51 1 1

where did those 1's come from?

Good catch! The code to count the result NELM was counting prototypes when it shouldn't have. It's fixed in the Alpha version:

http://www.nars2000.org/download/binaries/alpha/

BTW, you can see the trailing characters without having to lookup in ⎕AV by enabling Output Debugging via the menu items: "Edit | Customize... | User Preferences | Enable output debugging".
forummaster
 
Posts: 534
Joined: Wed Jan 23, 2013 1:00 pm

Re: trouble with ragged nested array

PostPosted by drab » Tue Apr 18, 2017 5:40 am

Please explain "Enable output debugging".

I tried it, but I didn't notice anything different.
drab
 
Posts: 283
Joined: Thu Oct 09, 2014 6:23 am

Re: trouble with ragged nested array

PostPosted by forummaster » Tue Apr 18, 2017 7:42 am

drab wrote:Please explain "Enable output debugging".

I tried it, but I didn't notice anything different.

Try 32⍴⎕AV, or

v←0 1⍴¨'2'
v←v,⊂v
w←'0',¨¨v
∊w

using a previous version of NARS2000, one without the bug fix to the Enlist function.
forummaster
 
Posts: 534
Joined: Wed Jan 23, 2013 1:00 pm

Re: trouble with ragged nested array

PostPosted by drab » Tue Apr 18, 2017 7:59 am

OK. That might occasionally be useful.

I see that it makes some special characters visible.

But not all of them.
I expected 16 16⍴⎕AV to show a nice square matrix, but it didn't.
drab
 
Posts: 283
Joined: Thu Oct 09, 2014 6:23 am

Re: trouble with ragged nested array

PostPosted by forummaster » Tue Apr 18, 2017 8:41 am

drab wrote:OK. That might occasionally be useful.

I see that it makes some special characters visible.

But not all of them.
I expected 16 16⍴⎕AV to show a nice square matrix, but it didn't.

* CR doesn't display as a special character in a box because we need it to avoid lines all flowing together
* The manufactured characters for 32⍴⎕AV are slightly wider than the normal character width (because if they were as narrow as a normal character, you wouldn't be able to read them), so the first two lines extend a bit, but that's perfectly normal when combining different fonts
* The characters 32⍴128↓⎕AV (along with many, many others) aren't defined in Unicode, so they take up no printed space.
forummaster
 
Posts: 534
Joined: Wed Jan 23, 2013 1:00 pm


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 4 guests

cron