Back to index

texmacs  1.0.7.15
obj2scm.m
Go to the documentation of this file.
00001 ## Released under the GNU General Public License, see www.gnu.org
00002 ## Copyright 2002 by the Free Software Foundation
00003 ## Written by Michael Graffam mikegraffam@yahoo.com
00004 ##
00005 ## Convert an Octave object to a Scheme expression
00006 ## Created: Sept 2002
00007 
00008 function tmp=obj2scm(n,c)
00009        if (nargin<2)
00010               c=0;
00011        endif
00012        switch (typeinfo(n))
00013               case ("range")
00014                      tmp=mat2scm(n);
00015               case ("matrix")
00016                      tmp=mat2scm(n);
00017               case ("complex matrix")
00018                      tmp=mat2scm(n);
00019               case ("bool matrix")
00020                      tmp=mat2scm(n);
00021               case ("char matrix")
00022                      tmp=mat2scm(n);
00023               case ("scalar")
00024                      tmp=num2scm(n);
00025               case ("complex scalar")
00026                      tmp=num2scm(n);
00027               case ("bool")
00028                      tmp=num2scm(n);
00029               case ("struct")
00030                      tmp=struct2scm(n,c+1,"(with \"mode\" \"math\" (big \"triangleup\"))");
00031               case ("string")
00032                      tmp=str2scm(n);
00033               case ("list")
00034                      tmp=list2scm(n,c);
00035               otherwise
00036                      tmp="";
00037        endswitch
00038 endfunction