⎕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 !

⎕NA domain Error

Postby ray on Wed Jun 05, 2024 2:20 pm

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.
User avatar
ray
 
Posts: 238
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: ⎕NA domain Error

Postby Vince|Dyalog on Thu Jun 06, 2024 9:44 am

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
Vince|Dyalog
 
Posts: 439
Joined: Wed Oct 01, 2008 9:39 am

Re: ⎕NA domain Error

Postby ray on Thu Jun 06, 2024 2:59 pm

Thank you. I will be happy either way.
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 238
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: ⎕NA domain Error

Postby Adam|Dyalog on Sun Jun 09, 2024 8:42 am

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'
User avatar
Adam|Dyalog
 
Posts: 143
Joined: Thu Jun 25, 2015 1:13 pm


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest