Page 1 of 1

Saveing a ns - I fear this might be embarassing.. :(

Posted: Mon Feb 06, 2012 10:06 pm
by MBaas
I've done it before and was able to save a namespace to a script, have a saved classes etc., so I thought I had understood it.
But somehow I'm getting frustrated now. Can somebody tell me what I am missing? (BTW, it is 11pm in germany now, so if it should be too obvious, pls. give me the benefit of a doubt and assume I am very tired after a long day...;-))...

Code: Select all

     )clear 
clear ws

      )ns foo1
#.foo1
      foo1.abc←⍳9
      ]save foo1
⍎Ref does not point to a SALTed namespace
Run[6] ⎕SE.SALT.Save Args
      ∧

      ]save #.foo1 -convert   
⍎Ref does not point to a SALTed namespace
Run[6] ⎕SE.SALT.Save Args
      ∧

Re: Saveing a ns - I fear this might be embarassing.. :(

Posted: Tue Feb 07, 2012 8:02 pm
by DanB|Dyalog
]save takes 1 or 2 arguments: the namespace and where you want to put it.
If only 1 argument is supplied the location is taken from where the PREVIOUS save was made.
In your case here, there was no previous save and your Ref (foo1) does not point to a SALTed ns (one which has been saved before).

Whenever you need help on a command you can enter ]?command, e.g. ]?save here or, better yet, ]??save in this case (not all cmds support ]??)

Cheers
/Dan

Re: Saveing a ns - I fear this might be embarassing.. :(

Posted: Tue Feb 07, 2012 8:43 pm
by MBaas
Argh - of course, thanks! Shame on me, but I have to admit I tried ]?save, but it did not occur to me that a filename was needed (and the error-msg wasn't clear enough either....)

Thanks!