[Scilab-users] save the variables except the functions

classic Classic list List threaded Threaded
3 messages Options
fujimoto2005 fujimoto2005
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] save the variables except the functions

Is there any command like "save(filename)" to saves all variables except for
function names and their definition?
When debugging, I want to use saved calculated variables after the
modification of some functions.
After I modify some functions and load all variables, the modified
definitions of the functions are updated by the old definitions of the
functions.
I want to save the variables except for the definition of the function in
order to avoid such a situation.

Thanks.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
amonmayr amonmayr
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? save the variables except the functions

Hello,

I think you can selectively retrieve only the variables, not the functions by combining:
- [names, typs, dims, vols] = listvarinfile(filename) that will list all the scilab objects saved in your file, with their type.
- a loop over the typs array to discriminate between the objects of type 1 (variables), and that of  type 13 (functions) .
- load(filename, x1,...,xn) that let you retrieve just a selection of all the objects in a given file.
 
Hope it helps,

Antoine
 
Le Lundi, Octobre 28, 2019 03:44 CET, fujimoto2005 <[hidden email]> a écrit:
 

> Is there any command like "save(filename)" to saves all variables except for
> function names and their definition?
> When debugging, I want to use saved calculated variables after the
> modification of some functions.
> After I modify some functions and load all variables, the modified
> definitions of the functions are updated by the old definitions of the
> functions.
> I want to save the variables except for the definition of the function in
> order to avoid such a situation.
>
> Thanks.
>
>
>
> --
> Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
>

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
fujimoto2005 fujimoto2005
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? save the variables except the functions

Dear Antoine,
Thank you for your reply.
I could fix the problem by your idea.

Best regards,
Masahiro Fujimoto



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users