summaryrefslogtreecommitdiff
path: root/texmf-dist/scripts/ketcindy/ketlib/ketpic2escifiles6/Putrowstr.sci
blob: d006f3ec924dcfc4ba697a9cd202ab35611f8cf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// 10.01.02 for v5

function Putrowstr(varargin)
  Tb=varargin(1);
  Nr=varargin(2);
  Pos=varargin(3);
  Str=varargin(4);
  Sep='';
  if length(varargin)>4
    Sep=varargin(5);
  end;
  if Sep==''
    for I=1:length(Str)
      Tmp=part(Str,I);
      Putcell(Tb,I,Nr,Pos,Tmp);
    end;
  else
    Ltr='';
    K=1;
    for I=1:length(Str)
      Tmp=part(Str,I);
      if Tmp==Sep
        Putcell(Tb,K,Nr,Pos,Ltr);
        K=K+1;
        Ltr='';
      else
        Ltr=Ltr+Tmp;
      end;
    end;
    if Ltr~=''
      Putcell(Tb,K,Nr,Pos,Ltr);
    end;
  end;
endfunction;