depth of instances
5 posts
• Page 1 of 1
depth of instances
let myinstance be a class 9.2 object.
Then
≡myinstance
0
And
≡myinstance myinstance
1
≡ 0⍴myinstance
NONCE ERROR
Can you explain the reason for NONCE ERROR? Thank you.
Then
≡myinstance
0
And
≡myinstance myinstance
1
≡ 0⍴myinstance
NONCE ERROR
Can you explain the reason for NONCE ERROR? Thank you.
-
giangiquario - Posts: 46
- Joined: Thu Nov 26, 2009 8:55 am
- Location: Milano, Italia
Re: depth of instances
You can create an empty array of instances (namespaces) but any operation that has to enquire into the contents fails because there aren't any and there isn't a prototype.
I guess depth is not contained in an array header.
I believe if you create a niladic constructor Dyalog will create a prototype for you and tell you the depth of an empty array formed from that.
But I haven't tried it.
I guess depth is not contained in an array header.
I believe if you create a niladic constructor Dyalog will create a prototype for you and tell you the depth of an empty array formed from that.
But I haven't tried it.
-
Phil Last - Posts: 557
- Joined: Thu Jun 18, 2009 6:29 pm
Re: depth of instances
The behaviour of references_to_namespaces and instances_of_classes is different.
Suppose that nspa is a reference to a namespace and inst is a instance of a class.
Let's begin with namespaces
Now consider an instances
I do not understand why inst has a prototype but has not any depth.
Suppose that nspa is a reference to a namespace and inst is a instance of a class.
Let's begin with namespaces
- Code: Select all
≡nspa
0
≡nspa nspa
1
0⍴nspa ⍝ is valid
⊃0⍴nspa
NONCE ERROR
⊃0⍴nspa
∧
≡0⍴nspa
NONCE ERROR
≡0⍴nspa
∧
Now consider an instances
- Code: Select all
≡inst
0
≡inst inst
1
0⍴inst ⍝ is valid
⊃0⍴inst ⍝ is valid! there is a prototype
#.[ResourceHolder]
≡0⍴inst
NONCE ERROR
≡0⍴inst
∧
I do not understand why inst has a prototype but has not any depth.
-
giangiquario - Posts: 46
- Joined: Thu Nov 26, 2009 8:55 am
- Location: Milano, Italia
Re: depth of instances
In which case I guess it really is a NONCE ERROR. I.e. "for the nonce", "for now", "until we get round to it"!
-
Phil Last - Posts: 557
- Joined: Thu Jun 18, 2009 6:29 pm
Re: depth of instances
I just discussed this with Morten; we agree that it is now time to eliminate this NONCE error.
- JohnS|Dyalog
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group