summaryrefslogtreecommitdiff
path: root/texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/PutcoLstr.sci
blob: b993ffa988e2ebdd4bd2924b73fb87cd52fd621f (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 PutcoLstr(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,Nr,I,Pos,Tmp);
    end;
  else
    Ltr='';
    K=1;
    for I=1:length(Str)
      Tmp=part(Str,I);
      if Tmp==Sep
        Putcell(Tb,Nr,K,Pos,Ltr);
        K=K+1;
        Ltr='';
      else
        Ltr=Ltr+Tmp;
      end;
    end;
    if Ltr~=''
      Putcell(Tb,Nr,K,Pos,Ltr);
    end;
  end;
endfunction;