Vairant within a defined operator
3 posts
• Page 1 of 1
Vairant within a defined operator
I have a defined operator which has the line
r←opts function ⍠ variant⊣FILENAME
"function" is the left operand and is always a quad function (It's a bit complicated to explain what I'm up to: this is DFS), but I get
DOMAIN ERROR: Invalid use of variant
Is this a failure to notice that it is a system function being called (which requires a variant in this case), or is it intentional to prevent "function" being a user-defined function?
r←opts function ⍠ variant⊣FILENAME
"function" is the left operand and is always a quad function (It's a bit complicated to explain what I'm up to: this is DFS), but I get
DOMAIN ERROR: Invalid use of variant
Is this a failure to notice that it is a system function being called (which requires a variant in this case), or is it intentional to prevent "function" being a user-defined function?
- crishog
- Posts: 61
- Joined: Mon Jan 25, 2010 9:52 am
Re: Vairant within a defined operator
It works for me. In version 17.0:
Can you give an example that does not work?
- Code: Select all
⎕VR'op'
∇ r←(fn op)arg
[1] r←fn⍠1⊢arg
∇
⎕NINFO op 'ws/d*.dws'
ws/display.dws ws/ddb.dws ws/dfns.dws
Can you give an example that does not work?
- Jay|Dyalog
Re: Vairant within a defined operator
If I do something similar directly in the workspace it works for me too. This happens in the DFS QA tests
I'll try to isolate an example. In the meantime, when I got the crash I typed:
opts ⎕NDELETE ⎕OPT variant⊣FILENAME ⍝ This works
opts function ⎕OPT variant⊣FILENAME ⍝ This doesn't
DOMAIN ERROR: Invalid use of variant
opts function ⎕OPT variant⊣FILENAME ⍝ This doesn't
∧
function
#.DFSTest.[DFCTest] . ⎕NDELETE . #.DFC
So the "raw" NDELETE worked, but not passing in the quad function.
This operator is to allow NEXISTS, NDELETE, MKDIR, etc. to handle multiple file names locally or pass it up to a DFS service to do the work, hence the need for the operator to do the low level choice between local and remote calls.
I'll try to isolate an example. In the meantime, when I got the crash I typed:
opts ⎕NDELETE ⎕OPT variant⊣FILENAME ⍝ This works
opts function ⎕OPT variant⊣FILENAME ⍝ This doesn't
DOMAIN ERROR: Invalid use of variant
opts function ⎕OPT variant⊣FILENAME ⍝ This doesn't
∧
function
#.DFSTest.[DFCTest] . ⎕NDELETE . #.DFC
So the "raw" NDELETE worked, but not passing in the quad function.
This operator is to allow NEXISTS, NDELETE, MKDIR, etc. to handle multiple file names locally or pass it up to a DFS service to do the work, hence the need for the operator to do the low level choice between local and remote calls.
- crishog
- Posts: 61
- Joined: Mon Jan 25, 2010 9:52 am
3 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