How to Use ⎕CS with ⎕LX

General APL language issues

How to Use ⎕CS with ⎕LX

Postby PGilbert on Tue Jun 16, 2015 11:36 pm

When loading a workspace with no ⎕LX it will show the # namespace at the beginning. But I would like to start instead in '#.MyNameSpace'. If I do the following it does not work:

Code: Select all
      ∇Init[⎕]∇
[0]   Init
[1]   ⎕CS '#.MyNameSpace'

⎕LX←'Init'


What is the proper way to do that ?

Thanks in advance,

Pierre Gilbert
User avatar
PGilbert
 
Posts: 419
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to Use ⎕CS with ⎕LX

Postby Vince|Dyalog on Wed Jun 17, 2015 3:21 pm

Hi Pierre,

I don't think that there's an easy or nice way to do this.

I have tried this, ⎕lx set to lx which is:
      lx
⎕TRAP←0 'C' '⎕CS ''ns'' ⋄ #.untrap'


⍝ and untrap is:

untrap
⎕TRAP←0⍴⎕TRAP


Regards,

Vince
Vince|Dyalog
 
Posts: 355
Joined: Wed Oct 01, 2008 9:39 am

Re: How to Use ⎕CS with ⎕LX

Postby PGilbert on Wed Jun 17, 2015 3:56 pm

Thanks Vince for your answer. I was hoping that I was missing something simple. If Dyalog wants to implement something more 'simple' to start the session in a specific namespace that would be appreciated.
User avatar
PGilbert
 
Posts: 419
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to Use ⎕CS with ⎕LX

Postby DanB|Dyalog on Wed Jun 17, 2015 9:10 pm

Actually if you do
Code: Select all
     ⎕lx←'⎕cs''ns'' ⋄ #.Init'

I think this would do it.
DanB|Dyalog
 

Re: How to Use ⎕CS with ⎕LX

Postby PGilbert on Thu Jun 18, 2015 3:30 am

Hello Dan, you are correct if I do:

Code: Select all
 ⎕LX←'⎕CS ''#.MyNameSpace'''


it is working.

Many thanks again !!!
User avatar
PGilbert
 
Posts: 419
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada


Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest