⎕NA domain Error

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
Post Reply
User avatar
ray
Posts: 238
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

⎕NA domain Error

Post by ray »

Hi

I am happily using a call via ⎕NA to define "ps" as "winmm" (to play ".WAV" files) via:

Code: Select all

  
      'ps'⎕NA'Winmm.dll|mciSendStringW <0t >0t i U'  
However if I try to define "#.ps" rather than "ps" I get a Domain Error thus:

Code: Select all

      '#.ps'⎕NA'Winmm.dll|mciSendStringW <0t >0t i U'
DOMAIN ERROR
      '#.ps'⎕NA'Winmm.dll|mciSendStringW <0t >0t i U'
            ∧                  ∧
I was surprised by this Domain Error, but got round it easily, so it is not an actual problem for me.

Is this Domain Error correct, or should I be able to define "#.ps"?
Ray Cannon
Please excuse any smelling pisstakes.
Vince|Dyalog
Posts: 439
Joined: Wed Oct 01, 2008 9:39 am

Re: ⎕NA domain Error

Post by Vince|Dyalog »

Hi Ray,

I have logged this as an issue, 21425.

One could argue that we should allow a namespace qualified name as the left argument of ⎕NA.

I will leave it to the developers to decide whether to implement that or document this restriction.

Regards,

Vince
User avatar
ray
Posts: 238
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: ⎕NA domain Error

Post by ray »

Thank you. I will be happy either way.
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
Adam|Dyalog
Posts: 143
Joined: Thu Jun 25, 2015 1:13 pm

Re: ⎕NA domain Error

Post by Adam|Dyalog »

ray wrote:I was surprised by this Domain Error, but got round it easily, so it is not an actual problem for me.
You don't detail how you go around it, but I imagine that this will work:
'ps'#.⎕NA'Winmm.dll|mciSendStringW <0t >0t i U'
Post Reply