~ubuntu-branches/ubuntu/hardy/texmacs/hardy

« back to all changes in this revision

Viewing changes to plugins/octave/octave/tm/list2scm.m

  • Committer: Bazaar Package Importer
  • Author(s): Ralf Treinen
  • Date: 2004-04-19 20:34:00 UTC
  • Revision ID: james.westby@ubuntu.com-20040419203400-g4e34ih0315wcn8v
Tags: upstream-1.0.3-R2
ImportĀ upstreamĀ versionĀ 1.0.3-R2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## Released under the GNU General Public License, see www.gnu.org
 
2
## Copyright (C) 2002 by the Free Software Foundation
 
3
## Written by Michael Graffam mikegraffam@yahoo.com
 
4
##
 
5
## Convert an Octave list to a Scheme expression
 
6
## Created: Sept 2002
 
7
 
 
8
function tmp=list2scm(L,c)
 
9
        if (nargin<2)
 
10
                c=1;
 
11
        endif   
 
12
        tmp="(enumerate-numeric (document";
 
13
        len=length(L);
 
14
        for i=1:len
 
15
                tmp=[tmp, " (concat (item) ", obj2scm(nth(L,i),c),")"];
 
16
        endfor
 
17
        tmp=[tmp,"))"];
 
18
endfunction