[DataType,NumberOfBytes,Compressed]=ReadTag(fd);
if meof(fd) then value=[],ArrayName="",return,end
if DataType<>miMatrix then
- error(msprintf(gettext("errors","Found Datatype=%d, expecting %d."),DataType,miMatrix));
+ error(msprintf(gettext("Found Datatype=%d, expecting %d."),DataType,miMatrix));
end
if NumberOfBytes==0 then value=[],return,end
[Flags,Class,NnzMax]=ReadArrayFlags(fd);
if RowIndex<>[] then RowIndex=RowIndex(:)+1,end
value=sparse([col(:),RowIndex],value(:),DimensionArray([2 1])).'
else
- error(gettext("errors","Unknown Class."));
+ error(gettext("Unknown Class."));
end
endfunction
mseek(pse,fd)
[value,ArrayName]=ReadmiMatrix(fd)
else
- error(msprintf(gettext("errors","Not implemented DataType: %d."),DataType));
+ error(msprintf(gettext("Not implemented DataType: %d."),DataType));
end
padding()
else
mclose(fd);
// This line has to be mofified according to message in 'loadmatfile' function
- error(gettext("errors","Invalid level 5 binary MAT-file!."));
+ error(gettext("Invalid level 5 binary MAT-file!."));
end
endfunction
NnzMax=0;
WriteSimpleElement(fd,value,miUINT16);
else
- warning(gettext("messages","Scilab string matrix saved as Matlab Cell."));
+ warning(gettext("Scilab string matrix saved as Matlab Cell."));
sz=size(value);
value=matrix(value,1,-1);
entries=list()
Class=Uint32Class;
WriteSimpleElement(fd,value,miUINT32);
else
- error(msprintf(gettext("errors","Unknown integer type: %s."),typeof(value)));
+ error(msprintf(gettext("Unknown integer type: %s."),typeof(value)));
end
elseif type(value)==17 then // MLIST used ofr CELLS and STRUCTS
Flags(1)=0;
end
end
else
- error(msprintf(gettext("errors","%s mlist type not yet implemented."),typeof(value)));
+ error(msprintf(gettext("%s mlist type not yet implemented."),typeof(value)));
end
elseif or(type(value)==[5,7]) then // SPARSE matrices
if type(value)==5 then // Scilab sparse is converted to Matlab sparse
WriteSimpleElement(fd,imag(v),miDOUBLE);
end
else
- error(msprintf(gettext("errors","%s not yet implemented."),typeof(value)));
+ error(msprintf(gettext("%s not yet implemented."),typeof(value)));
end
SavePosAfter=mtell(fd);
// Write the mat file header informations
// VC
-head=gettext("messages","MATLAB 5.0 MAT-file, Generated by Scilab");
+head=gettext("MATLAB 5.0 MAT-file, Generated by Scilab");
head=head+part(" ",1:(124-length(head)));
mput(ascii(head),'uc',fd);
elseif and(IM_MI==[77,73]) then // big endian file
swap='b'
else
- error(gettext("errors","Error while writing MI."));
+ error(gettext("Error while writing MI."));
end
// Following call to mseek is needed under Windows
// to set file pointer after reading
NumberOfBytes=NumberOfValues*4;
fmt="u"+md_i;
else
- error(msprintf(gettext("errors","Error while writing MI."),string(DataType)));
+ error(msprintf(gettext("Error while writing MI."),string(DataType)));
end
Compressed=NumberOfBytes<=4;
end
nbcol= size(ytemp,'*')*size(x,2)/size(x,'*')
if nbcol-floor(nbcol)<>0 then
- error(gettext("errors","Input argument: inconsistent size."));
+ error(gettext("Input argument: inconsistent size."));
end
y=[]
for i=1:size(x,1)
y(k)=ascii(x(k,:))
end
else
- error(gettext("errors","Not yet implemented."));
+ error(gettext("Not yet implemented."));
end
elseif size(size(x),"*")>2 then
if typeof(x)=="hypermat" then
end
end
else
- error(gettext("errors","Not yet implemented."));
+ error(gettext("Not yet implemented."));
end
endfunction
end
y=[y;t]
else
- error(gettext("errors","Cell elements must be characters arrays."));
+ error(gettext("Cell elements must be characters arrays."));
end
elseif type(lst)==10 then //cell elements are a string matrix
t=emptystr(size(lst,1),1)
end
y=[y,t]
else // cell contains more than one element
- error(gettext("errors","Cell elements must be arrays chars."));
+ error(gettext("Cell elements must be arrays chars."));
end
else
for i=1:size(lst)
end
y=[y;t]
else
- error(gettext("errors","Cell elements must be arrays chars."));
+ error(gettext("Cell elements must be arrays chars."));
end
elseif type(lst(i))==10 then
t=emptystr(size(lst(i),1),1)
end
y=[y;t]
else
- error(gettext("errors","Cell elements must be arrays chars."));
+ error(gettext("Cell elements must be arrays chars."));
end
end
end
elseif type(varargin(1).entries)==1|type(varargin(1).entries)==8 then ////Input is a hypermatrix of integers (or reals)
y=asciimat(varargin(1))
else
- error(gettext("errors","Not implemented."));
+ error(gettext("Not implemented."));
end
else
- error(gettext("errors","Input argument must be a cell."));
+ error(gettext("Input argument must be a cell."));
end
//More than one input argument
elseif rhs>1 then
end
y=[y;t]
else
- error(gettext("errors","Inputs arguments must be characters arrays."));
+ error(gettext("Inputs arguments must be characters arrays."));
end
elseif type(varargin(i))==10 then //Input sti is a matrix of strings
lst=varargin(i)
end
y=[y;t]
else
- error(gettext("errors","Inputs arguments must be characters arrays."));
+ error(gettext("Inputs arguments must be characters arrays."));
end
end
//Add blanks at the length of strings
case 1 then
flag="end"
else
- error(gettext("errors","mseek: Unknown reference flag."));
+ error(gettext("mseek: Unknown reference flag."));
end
endfunction
// Verify that all inputs are character strings
for k=1:size(varargin)
if type(varargin(k))<>10 then
- error(gettext("errors","All inputs must be character strings."));
+ error(gettext("All inputs must be character strings."));
end
end
bin=%F
k=k+1
case "-regexp"
- warning(msprintf(gettext("messages","Option %s not implemented: IGNORED."),"-regexp"));
+ warning(msprintf(gettext("Option %s not implemented: IGNORED."),"-regexp"));
while k<=lstsize(varargin) & and(varargin(k)<>["-mat","-ascii"])
k=k+1
end
if ierr<>0 then
errmsg=lasterror()
// This line has to be mofified according to error message in 'matfile_header' function
- if stripblanks(errmsg)==gettext("errors","Invalid level 5 binary MAT-file!.") then
+ if stripblanks(errmsg)==gettext("Invalid level 5 binary MAT-file!.") then
// Level 4 binary file ?
level=4;
else
b_flags=['db','fb','lb','sb','ubs','uc']
deff('Error(msg)',['mclose(fd)' ;'error(msg)'])
[fd,err]=mopen(fil,'rb',0)
- if err<>0 then error(msprintf(gettext("errors","File %s cannot be opened for reading."),fil)),end
+ if err<>0 then error(msprintf(gettext("File %s cannot be opened for reading."),fil)),end
vars=list() //list to store loaded variables
names=[] // vector of variables names
mopt=mget(1,'uib',fd)
if mopt>5000 then
- Error(gettext("errors","Incorrect file."));
+ Error(gettext("Incorrect file."));
end
end
MOPT=[]
fl='uib'
flag=b_flags(MOPT(3)+1)
case 2
- Error(gettext("errors","VAX D-float not handled."));
+ Error(gettext("VAX D-float not handled."));
case 3
- Error(gettext("errors","VAX G-float not handled."));
+ Error(gettext("VAX G-float not handled."));
case 4
- Error(gettext("errors","Cray encoding not handled."));
+ Error(gettext("Cray encoding not handled."));
else
- Error(gettext("errors","Unknown binary number format."));
+ Error(gettext("Unknown binary number format."));
end
t=mget(4,fl,fd);
- if meof(fd)<>0 then Error(gettext("errors","Incorrect file.")),end
+ if meof(fd)<>0 then Error(gettext("Incorrect file.")),end
m=t(1);n=t(2);it=t(3),namelen=t(4)
name=mget(namelen,"c",fd);
- if meof(fd)<>0 then Error(gettext("errors","Incorrect file.")),end
+ if meof(fd)<>0 then Error(gettext("Incorrect file.")),end
name=ascii(name(1:namelen-1))
// Old version compatibility | Name has been given
if MOPT(4)==0 then // regular matrix
v=mget((it+1)*m*n,flag,fd);
- if meof(fd)<>0 then Error(gettext("errors","Incorrect file.")),end
+ if meof(fd)<>0 then Error(gettext("Incorrect file.")),end
if it==0 then
mat=matrix(v,m,n);
elseif it==1
end
elseif MOPT(4)==1 // vector of strings
v=mget(m*n,flag,fd);
- if meof(fd)<>0 then Error(gettext("errors","Incorrect file.")),end
+ if meof(fd)<>0 then Error(gettext("Incorrect file.")),end
mat=matrix(v(1:m*n),m,n);
w=mat;
mat=[];
elseif MOPT(4)==2 //sparse matrix
//sparse
Nnz=m-1;
- it=n-3;if it<>0&it<>1 then Error(gettext("errors","Unknown sparse type.")),end
+ it=n-3;if it<>0&it<>1 then Error(gettext("Unknown sparse type.")),end
ir=mget(Nnz,flag,fd);m=mget(1,"d",fd);
jc=mget(Nnz,flag,fd);n=mget(1,"d",fd);
v=mget(Nnz,flag,fd);junk=mget(1,"d",fd);
- if meof(fd)<>0 then Error(gettext("errors","Incorrect file.")),end
+ if meof(fd)<>0 then Error(gettext("Incorrect file.")),end
if it==1 then
//complex
v=v+%i*mget(Nnz,flag,fd);
//form execstr instruction to resume variables in the calling environment
execstr('['+strcat(names,',')+']=resume(vars(:))')
else
- error(gettext("errors","Unknown Matlab binary file format."));
+ error(gettext("Unknown Matlab binary file format."));
end
// --- ASCII FILE (Copy/Paste from mtlb_load.sci) ---
dims=varargin(1)
if prod(dims)<>lstsize(varargin)-1 then
- error(gettext("errors","Dimensions and entries do not match."));
+ error(gettext("Dimensions and entries do not match."));
end
if prod(dims)==1 then
// This function solves this problem by converting a string into a character matrix
// Ex : 'string' is converted into ['s' 't' 'r' 'i' 'n' 'g']
-if type(x)==17 then error(gettext("errors","Not written for hypermatrices.")),return,end
-if type(x)<>10 then error(gettext("errors","Input argument must be a caracter string matrix.")),return,end
+if type(x)==17 then error(gettext("Not written for hypermatrices.")),return,end
+if type(x)<>10 then error(gettext("Input argument must be a caracter string matrix.")),return,end
nr=size(x,1);
nc=max(length(x));
y=[]
elseif type(varargin(1))==1 then
xsetech(AXES_T(k)(varargin(1),:))
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
for krhs=1:rhs
if type(listvar(krhs))==1 then
if size(listvar(krhs),1)>1 & size(listvar(krhs),2)>1 then
- error(gettext("errors","a.data_bounds must be a vector."));
+ error(gettext("a.data_bounds must be a vector."));
end
listvar(krhs) = matrix(listvar(krhs),1,-1);
set(gca(),"axes_visible",'on')
// axis([xmin xmax ymin ymax zmin zmax cmin cmax])
elseif size(listvar(krhs),2)==8 then
- error(gettext("errors","a.data_bounds=[xmin xmax ymin ymax zmin zmax cmin cmax] not implemented."));
+ error(gettext("a.data_bounds=[xmin xmax ymin ymax zmin zmax cmin cmax] not implemented."));
// Unknown column number for listvar(krhs)
else
- error(gettext("errors","Bad affectation for a.data_bounds."));
+ error(gettext("Bad affectation for a.data_bounds."));
end
elseif type(listvar(krhs))==10 then
// axis fill
elseif listvar(krhs)=="fill" then
- error(gettext("errors","axis fill not implemented."));
+ error(gettext("axis fill not implemented."));
// axis ij
elseif listvar(krhs)=="ij" then
// axis image
elseif listvar(krhs)=="image" then
- error(gettext("errors","axis image not implemented."));
+ error(gettext("axis image not implemented."));
// axis square
elseif listvar(krhs)=="square" then
if a.view=="2d" then
- warning(gettext("messages","cube_scaling only used in 3d mode."));
+ warning(gettext("cube_scaling only used in 3d mode."));
end
a.cube_scaling="on"
// axis normal
elseif listvar(krhs)=="normal" then
- error(gettext("errors","axis normal not implemented."));
+ error(gettext("axis normal not implemented."));
// axis on
elseif listvar(krhs)=="on" then
end
// Unknown character string
else
- error(msprintf(gettext("errors","axis %s not implemented."),listvar(krhs)));
+ error(msprintf(gettext("axis %s not implemented."),listvar(krhs)));
end
// axis(axes_handles,...)
end
// Wrong type for listvar(krhs)
else
- error(msprintf(gettext("errors","Argument of type %d not implemented."),type(listvar(krhs))));
+ error(msprintf(gettext("Argument of type %d not implemented."),type(listvar(krhs))));
end
varargout(1)=matrix(a.data_bounds,1,-1);
end
elseif rhs==2 then // box(axes_handle,...)
axes_handle.box=convstr(val,"l")
else
- error(gettext("errors","Not yet implemented."));
+ error(gettext("Not yet implemented."));
end
endfunction
function mtlb_choices(nam,header,labels,callbacks,inter)
// Copyright INRIA
while %t
- num=x_choose(labels,header,gettext("menus","Close"))
+ num=x_choose(labels,header,gettext("Close"))
if num==0 then break,end
execstr(callbacks(num))
end
rhs=argn(2)
-warning(gettext("messages","mtlb_close: status ignored."));
+warning(gettext("mtlb_close: status ignored."));
status=1
// close
scf(cf_save)
end
else // Unknown type for h
- error(gettext("errors","Not implemented."))
+ error(gettext("Not implemented."))
end
else // close('all','hidden')
- warning(gettext("messages","mtlb_close: all windows deleted."));
+ warning(gettext("mtlb_close: all windows deleted."));
xdel(winsid())
end
endfunction
// F.B.
if A == [] then c = 0, return, end
-if size(A,1) <> size(A,2) & flag <> 2 then error(gettext("errors","Matrix must be square.")),end
+if size(A,1) <> size(A,2) & flag <> 2 then error(gettext("Matrix must be square.")),end
if flag == 1
c = norm(A,1)*norm(inv(A),1);
elseif flag == "inf"
c = norm(A,'inf')*norm(inv(A),'inf');
else
- error(gettext("errors","The second input argument must be 1, 2,''fro'' or ''inf''."));
+ error(gettext("The second input argument must be 1, 2,''fro'' or ''inf''."));
end
endfunction
elseif type(y)==9 then
delete(y);
else
- error(gettext("errors","Not yet implemented."));
+ error(gettext("Not yet implemented."));
end
endfunction
if ( (x == []) & (ierr== -1) ) then [x,ierr]=fileinfo(files(k)),end
if x<>[] then
w=getdate(x(6))
- month=[gettext("messages","Jan"),..
- gettext("messages","Feb"),..
- gettext("messages","Mar"),..
- gettext("messages","Apr"),..
- gettext("messages","May"),..
- gettext("messages","Jun"),..
- gettext("messages","Jul"),..
- gettext("messages","Aug"),..
- gettext("messages","Sep"),..
- gettext("messages","Oct"),..
- gettext("messages","Nov"),..
- gettext("messages","Dec")];
+ month=[gettext("Jan"),..
+ gettext("Feb"),..
+ gettext("Mar"),..
+ gettext("Apr"),..
+ gettext("May"),..
+ gettext("Jun"),..
+ gettext("Jul"),..
+ gettext("Aug"),..
+ gettext("Sep"),..
+ gettext("Oct"),..
+ gettext("Nov"),..
+ gettext("Dec")];
ldate(k)=string(w(6))+"-"+month(w(2))+"-"+string(w(1))+" "+string(w(7))+":"+string(w(8))+":"+string(w(9))
lbytes(k)=x(1);
elseif arg1=="off" then
mode(0);
else
- error(gettext("errors","Not yet implemented."));
+ error(gettext("Not yet implemented."));
end
else
- error(gettext("errors","Not yet implemented."));
+ error(gettext("Not yet implemented."));
end
endfunction
end
end
else
- error(gettext("errors","mtlb_eig() used with 2 rhs: not yet implemented."));
+ error(gettext("mtlb_eig() used with 2 rhs: not yet implemented."));
end
endfunction
[fid,err]=mopen(filename,permission,0)
if err<0 then
fid=-1
- mess=gettext("messages","Cannot open file.");
+ mess=gettext("Cannot open file.");
else
mess=""
end
if unk then
- error(gettext("errors","Unknown type in mtlb_format()."))
+ error(gettext("Unknown type in mtlb_format()."))
elseif ratf|loose|compact|bank|hex then
- warning(msprintf(gettext("messages","Unknown type %s in mtlb_format(): INGNORED."),type));
+ warning(msprintf(gettext("Unknown type %s in mtlb_format(): INGNORED."),type));
else
if rhs1==1 then
format(d+1)
mprintf(fmt,l(:))
count=size(a,"*")
elseif nv==0 then
- error(msprintf(gettext("errors","In mtlb_fprintf: mprintf(%s) is not implemented."),fmt));
+ error(msprintf(gettext("In mtlb_fprintf: mprintf(%s) is not implemented."),fmt));
else
sz=[]
for k=1:nv
mprintf(fmt,varargin(2:$))
count=size(sz,"*")
else
- error(gettext("errors","In mtlb_fprintf: mprintf Scilab function does not work with more than one row variables."))
+ error(gettext("In mtlb_fprintf: mprintf Scilab function does not work with more than one row variables."))
end
end
// mtlb_fprintf(fid,fmt,...)
count=length(varargin(2))
elseif nv==0 then
if or(fid==[1 2]) then
- error(gettext("errors","In mtlb_fprintf: mprintf(format) is not implemented."))
+ error(gettext("In mtlb_fprintf: mprintf(format) is not implemented."))
else
- error(gettext("errors","In mtlb_fprintf: mfprintf(fid,format) is not implemented."))
+ error(gettext("In mtlb_fprintf: mfprintf(fid,format) is not implemented."))
end
else
sz=[]
end
else
if or(fid==[1 2]) then
- error(gettext("errors","In mtlb_fprintf: mprintf Scilab function does not work with more than one row variables."))
+ error(gettext("In mtlb_fprintf: mprintf Scilab function does not work with more than one row variables."))
else
mfprintfMat(fid,varargin(3:$),fmt)
for k=1:nv
end
[l,k]=find(prec==prectbl)
if l==[] then
- error(msprintf(gettext("errors","The format: %s is unknown."),prec))
+ error(msprintf(gettext("The format: %s is unknown."),prec))
end
Prec=prectbl(l,1)
if Prec=="?" then
- error(msprintf(gettext("errors","The format: %s is not yet handled."),prec))
+ error(msprintf(gettext("The format: %s is not yet handled."),prec))
end
if isinf(sz) then
a=[]
if meof(fid)<>0 then
mclearerr(fid)
- error(gettext("errors","Cell elements must be arrays chars.8"))
+ error(gettext("Cell elements must be arrays chars.8"))
end
if size(sz,"*")==1 then
a=a(:)
[l,k]=find(prec==prectbl)
if l==[] then
- error(msprintf(gettext("errors","The format: %s is unknown."),prec));
+ error(msprintf(gettext("The format: %s is unknown."),prec));
end
Prec=prectbl(l,1)
if Prec=="?" then
- error(msprintf(gettext("errors","The format: %s is not yet handled."),prec));
+ error(msprintf(gettext("The format: %s is not yet handled."),prec));
end
mput(a,Prec,fid)
count=size(a,"*")
case 'colormap' then
v=xget('colormap')
case 'currentaxes' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'currentcharacter' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'currentmenu' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'currentobject' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'currentpoint' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'fixedcolors' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'inverthardcopy' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'keypressfcn' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'menubar' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'mincolormap' then
v=xget('colormap')
v=size(v,1)
case 'name' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'nextplot' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'numbertitle' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'paperunits' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'paperorientation' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'paperposition' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'papersize' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'papertype' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'pointer' then
v='arrow'
case 'position' then
case 'resize' then
v='on'
case 'resizefcn' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'selectiontype' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'sharecolors' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'units' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'windowbuttondownfcn' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'windowbuttonmotionfcn' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'windowbuttonupfcn' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'buttondownfcn' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'children' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'clipping' then
v=xget('clipping')
if v(1)<>0 then v='on',else v='off',end
case 'interruptible' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'parent' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'type' then
v='figure'
case 'userdata' then
- error(msprintf(gettext("errors","End of file reached before all matrix is read."),property));
+ error(msprintf(gettext("End of file reached before all matrix is read."),property));
case 'visible' then
v='on'
end
elseif arg1=="off" then
a.grid=[-1 -1]
elseif arg1=="minor" then
- warning(gettext("messages","No minor grid."));
+ warning(gettext("No minor grid."));
if and(a.grid==[-1 -1]) then
a.grid=[1 1]
else
a.grid=[-1 -1]
end
else
- error(gettext("errors","Wrong option."));
+ error(gettext("Wrong option."));
end
end
elseif rhs==2 then
elseif arg2=="off" then
arg1.grid=[-1 -1]
elseif arg2=="minor" then
- warning(gettext("messages","No minor grid."));
+ warning(gettext("No minor grid."));
if and(arg1.grid==[-1 -1]) then
arg1.grid=[1 1]
else
arg1.grid=[-1 -1]
end
else
- error(gettext("errors","Wrong option."));
+ error(gettext("Wrong option."));
end
end
endfunction
elseif flag=="off" then
a=gca();a.auto_clear="on"
else
- error(gettext("errors","Not implemented."))
+ error(gettext("Not implemented."))
end
end
endfunction
[mto,nto]=size(sto)
// convert sto to a regular matrix
if type(sto)==10 then
- if nto<>1 then error(gettext("errors","First argument is not a Matlab vector of strings.")),end
+ if nto<>1 then error(gettext("First argument is not a Matlab vector of strings.")),end
if mto==1 then
lnto=length(sto)
sto=ascii(sto)
[mfrom,nfrom]=size(sfrom)
// convert sfrom to a regular matrix
if type(sfrom)==10 then
- if nfrom<>1 then error(gettext("errors","First argument is not a Matlab vector of strings.")),end
+ if nfrom<>1 then error(gettext("First argument is not a Matlab vector of strings.")),end
if mfrom==1 then
lnfrom=length(sfrom)
sfrom=ascii(sfrom)
case "lti"
r=typeof(OBJ)=="state-space"
else
- error(msprintf(gettext("errors","Unhandled class: %s."),class));
+ error(msprintf(gettext("Unhandled class: %s."),class));
end
endfunction
rhs=argn(2)
if ndims(n) <> 2 | size(n,"*") <> 1 | floor(n)-n <> 0 | n<0 then
- error(gettext("errors","First argument must be a positive integer."));
+ error(gettext("First argument must be a positive integer."));
end
m = 0:n;
function mtlb_load(thefile,opt)
//loads matlab 4.x binary (.mat) or ascii files
//
-warning(msprintf(gettext("messages","This function is obsolete, use %s instead."),"loadmatfile"));
+warning(msprintf(gettext("This function is obsolete, use %s instead."),"loadmatfile"));
l_flags=['dl','fl','ll','sl','uls','uc']
b_flags=['db','fb','lb','sb','ubs','uc']
if convstr(opt)=='-ascii' then
bin=%f
else
- error(msprintf(gettext("errors","%s: Unknown option."),opt));
+ error(msprintf(gettext("%s: Unknown option."),opt));
end
else
k=strindex(thefile,'.')
if bin then
[fd,err]=mopen(thefile,'rb',0)
- if err<>0 then error(msprintf(gettext("errors","File %s cannot be opened for reading."),thefile)),end
+ if err<>0 then error(msprintf(gettext("File %s cannot be opened for reading."),thefile)),end
vars=list() //list to store loaded variables
names=[] // vector of variables names
mopt=mget(1,'uib',fd)
if mopt>5000 then
- Error(gettext("errors","Incorrect file."))
+ Error(gettext("Incorrect file."))
end
end
MOPT=[]
fl='uib'
flag=b_flags(MOPT(3)+1)
case 2
- Error(gettext("errors","VAX D-float not handled."))
+ Error(gettext("VAX D-float not handled."))
case 3
- Error(gettext("errors","VAX G-float not handled."))
+ Error(gettext("VAX G-float not handled."))
case 4
- Error(gettext("errors","Cray encoding not handled."))
+ Error(gettext("Cray encoding not handled."))
else
- Error(gettext("errors","Unknown binary number format."))
+ Error(gettext("Unknown binary number format."))
end
t=mget(4,fl,fd);
- if meof(fd)<>0 then Error(gettext("errors","Incorrect file.")),end
+ if meof(fd)<>0 then Error(gettext("Incorrect file.")),end
m=t(1);n=t(2);it=t(3),namelen=t(4)
name=mget(namelen,"c",fd);
- if meof(fd)<>0 then Error(gettext("errors","Incorrect file.")),end
+ if meof(fd)<>0 then Error(gettext("Incorrect file.")),end
name=ascii(name(1:namelen-1))
names=[names name]
if MOPT(4)==0 then // regular matrix
v=mget((it+1)*m*n,flag,fd);
- if meof(fd)<>0 then Error(gettext("errors","Incorrect file.")),end
+ if meof(fd)<>0 then Error(gettext("Incorrect file.")),end
if it==0 then
mat=matrix(v,m,n);
elseif it==1
end
elseif MOPT(4)==1 // vector of strings
v=mget(m*n,flag,fd);
- if meof(fd)<>0 then Error(gettext("errors","Incorrect file.")),end
+ if meof(fd)<>0 then Error(gettext("Incorrect file.")),end
mat=matrix(v(1:m*n),m,n);
w=mat;
mat=[];
elseif MOPT(4)==2 //sparse matrix
//sparse
Nnz=m-1;
- it=n-3;if it<>0&it<>1 then Error(gettext("errors","Unknown sparse type.")),end
+ it=n-3;if it<>0&it<>1 then Error(gettext("Unknown sparse type.")),end
ir=mget(Nnz,flag,fd);m=mget(1,"d",fd);
jc=mget(Nnz,flag,fd);n=mget(1,"d",fd);
v=mget(Nnz,flag,fd);junk=mget(1,"d",fd);
- if meof(fd)<>0 then Error(gettext("errors","Incorrect file.")),end
+ if meof(fd)<>0 then Error(gettext("Incorrect file.")),end
if it==1 then
//complex
v=v+%i*mget(Nnz,flag,fd);
if type(f)==10 then
s=msprintf(f,x)
else
- error(gettext("errors","Not implemented."))
+ error(gettext("Not implemented."))
end
end
endfunction
linespec2sci(varargin(k+1),curh)
k=k+2
elseif ~isempty(strindex("markeredgecolor",opt)) then
- warning(gettext("messages","MarkerEdgeColor option ignored."));
+ warning(gettext("MarkerEdgeColor option ignored."));
k=k+2
elseif ~isempty(strindex("markerfacecolor",opt)) then
curh=markplot.children(1)
if styl>=0 then
cur_handle.line_style=styl
elseif ~isempty(ind) then
- warning(msprintf(gettext("messages","Unknown line style found in ''%s'' -> set to 6."),linespec));
+ warning(msprintf(gettext("Unknown line style found in ''%s'' -> set to 6."),linespec));
cur_handle.line_style=6
end
cur_handle.foreground=color(clr)
mtlbColor=name2rgb(clr)
elseif ~isempty(ind) then
- warning(msprintf(gettext("messages","Unknown color found in ''%s'' -> set to black."),linespec));
+ warning(msprintf(gettext("Unknown color found in ''%s'' -> set to black."),linespec));
cur_handle.foreground=color("black")
mtlbColor=name2rgb("black")
end
[lhs,rhs]=argn()
if lhs<>3 then
- error(msprintf(gettext("errors","Not yet implemented for %d lhs argument(s)."),lhs));
+ error(msprintf(gettext("Not yet implemented for %d lhs argument(s)."),lhs));
end
if rhs<>2 then
- error(msprintf(gettext("errors","Not yet implemented for %d rhs argument(s)."),rhs));
+ error(msprintf(gettext("Not yet implemented for %d rhs argument(s)."),rhs));
end
[Q,R,E] = qr(A)
for k=1:n
K=kernel(A*LB(k)-B*LA(k))
if size(K,2)<>1 then
- error(gettext("errors","qz: pencil is not diagonalizable."))
+ error(gettext("qz: pencil is not diagonalizable."))
end
V(:,k)=K
end
if prec=="double" then
val=number_properties("huge");
else
- error(gettext("errors","Not yet implemented."));
+ error(gettext("Not yet implemented."));
end
else
- error(gettext("errors","Wrong number of inputs."));
+ error(gettext("Wrong number of inputs."));
end
endfunction
if prec=="double" then
val=number_properties("tiny");
else
- error(gettext("errors","Not yet implemented."));
+ error(gettext("Not yet implemented."));
end
else
- error(gettext("errors","Wrong number of inputs."));
+ error(gettext("Wrong number of inputs."));
end
endfunction
//save variable under matlab 4.x .mat binary format files
//see: www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf
-warning(msprintf(gettext("messages","This function is obsolete, use %s instead."),"savematfile"));
+warning(msprintf(gettext("This function is obsolete, use %s instead."),"savematfile"));
// Verify that all inputs are character strings
for k=1:size(varargin)
if type(varargin(k))<>10 then
- error(gettext("messages","mtlb_close: status ignored.9"));
+ error(gettext("mtlb_close: status ignored.9"));
end
end
// check name conflicts
for k=['mtlb_thefile','varargin','mtlb_names','mtlb_opts','mtlb_fd']
if or(mtlb_names==k) then
- error(msprintf(gettext("errors","Name conflict: it is not possible to save variable with name %s."),k));
+ error(msprintf(gettext("Name conflict: it is not possible to save variable with name %s."),k));
end
end
// clear variable wich are no more used to avoid name conflicts
P=5
T=1
else
- error(gettext("errors","Attempt to write an unsupported data type to an ASCII file."))
+ error(gettext("Attempt to write an unsupported data type to an ASCII file."))
end
[m,n]=size(x)
else //ascii save
if convstr(mtlb_opts(1))<>'-ascii' then
- error(msprintf(gettext("errors","Unknown or misplaced option %s."),mtlb_opts(1)));
+ error(msprintf(gettext("Unknown or misplaced option %s."),mtlb_opts(1)));
end
if size(mtlb_opts,'*')==3 then
sep=str2code(-40)
// clear variable wich are no more used to avoid name conflicts
for k=['mtlb_thefile','varargin','mtlb_names','mtlb_fmt','mtlb_fd']
if or(mtlb_names==k) then
- error(msprintf(gettext("errors","Name conflict: it is not possible to save variable with name %s."),k));
+ error(msprintf(gettext("Name conflict: it is not possible to save variable with name %s."),k));
end
end
clear('rhs','lhs','kk','err','sep');
indexlist=list((1:size(A,1))');
if size(cls,2)>1 then
- error(gettext("errors","Second input argument must be a column vector."))
+ error(gettext("Second input argument must be a column vector."))
end
if type(A)==10 then
fmt=strcat(fmt(ones(1,mult))) // duplicate format
s=msprintf(fmt,varargin(:))
else
- error(gettext("errors","mtlb_printf : this particular case is not implemented."))
+ error(gettext("mtlb_printf : this particular case is not implemented."))
end
end
K=strindex(s,'\n')
function [a,nvars,errmsg,nextindex] = mtlb_sscanf(s,fmt,sz)
[lhs,rhs]=argn()
-if lhs==4 then error(gettext("errors","mtlb_sscanf: nextindex not implemented.")),end
+if lhs==4 then error(gettext("mtlb_sscanf: nextindex not implemented.")),end
if rhs<3 then sz=%inf,end
nmx=prod(sz)
nvars=0
if lvars==-1 then
a=''
return
- errmsg=gettext("errors","End of string reached before a datun has been read.");
+ errmsg=gettext("End of string reached before a datun has been read.");
else
nvars=size(lvars)
nv=min(nvars,nmx)
if ierr==0 then // filename.sci exists
disp(mgetl(mopen(SCIfilename,"r")))
else
- disp(msprintf(gettext("messages","Could not open neither %s nor %s nor %s."),filename,Mfilename,SCIfilename));
+ disp(msprintf(gettext("Could not open neither %s nor %s nor %s."),filename,Mfilename,SCIfilename));
end
end
end
// Verify that all inputs are character strings
for k=1:size(varargin)
if type(varargin(k))<>10 then
- error(gettext("errors","All inputs must be character strings."));
+ error(gettext("All inputs must be character strings."));
end
end
select varargin(k)
case "-append"
- warning(msprintf(gettext("messages","Option %s not implemented: IGNORED."),"-append"));
+ warning(msprintf(gettext("Option %s not implemented: IGNORED."),"-append"));
k=k+1
case "-mat"
bin=%T
mtlb_opts=[mtlb_opts varargin(k)];
k=k+1
case "-regexp"
- warning(msprintf(gettext("messages","Option %s not implemented: IGNORED."),"-regexp"));
+ warning(msprintf(gettext("Option %s not implemented: IGNORED."),"-regexp"));
while k<=lstsize(varargin) & and(varargin(k)<>["-mat","-ascii"])
k=k+1
end
// Default version 6 for binary files
if isempty(version) & bin then
version=6;
- warning(gettext("messages","Option -v6 added."));
+ warning(gettext("Option -v6 added."));
end
// If no name given then all workspace saved
for k=size(mtlb_names,"*"):-1:1
execstr("x="+mtlb_names(k))
if and(type(x)<>[1 4 5 6 10]) then
- warning(msprintf(gettext("messages","Variable %s can not be saved in level 4 MAT-file: IGNORED."),mtlb_names(k)));
+ warning(msprintf(gettext("Variable %s can not be saved in level 4 MAT-file: IGNORED."),mtlb_names(k)));
mtlb_names(k)=[]
end
end
// Clear variable wich are no more used to avoid name conflicts
for k=["varargin","mtlb_names","mtlb_fmt","mtlb_fd"]
if or(mtlb_names==k) then
- error(msprintf(gettext("errors","Name conflict: it is not possible to save variable with name %s."),k));
+ error(msprintf(gettext("Name conflict: it is not possible to save variable with name %s."),k));
end
end
clear("x","k","rhs","lhs","kk","err","bin","version","mtlb_thefile","mtlb_opts");
P=5
T=1
else
- error(gettext("errors","Attempt to write an unsupported data type to an ASCII file."));
+ error(gettext("Attempt to write an unsupported data type to an ASCII file."));
end
[m,n]=size(x)
// Clear variable wich are no more used to avoid name conflicts
for k=["endian","varargin","mtlb_names","mtlb_fmt","mtlb_fd"]
if or(mtlb_names==k) then
- error(msprintf(gettext("messages","Name conflict: it is not possible to save variable with name %s."),k))
+ error(msprintf(gettext("Name conflict: it is not possible to save variable with name %s."),k))
end
end
clear("x","k","rhs","lhs","kk","err","sep","bin","version","mtlb_thefile","mtlb_opts");
mclose(mtlb_fd);
else
// This part should contain miCOMPRESSED data type handling
- error(msprintf(gettext("errors","Version %d MAT-file not implemented."),version));
+ error(msprintf(gettext("Version %d MAT-file not implemented."),version));
end
// ASCII save
for k=size(mtlb_names,"*"):-1:1
execstr("x="+mtlb_names(k))
if and(type(x)<>[1 4 5 6 10]) then
- warning(msprintf(gettext("messages","Variable %s can not be saved in ASCII file: IGNORED."),mtlb_names(k)));
+ warning(msprintf(gettext("Variable %s can not be saved in ASCII file: IGNORED."),mtlb_names(k)));
mtlb_names(k)=[]
end
end
// Clear variable wich are no more used to avoid name conflicts
for k=["varargin","mtlb_names","mtlb_fmt","mtlb_fd"]
if or(mtlb_names==k) then
- error(msprintf(gettext("errors","Name conflict: it is not possible to save variable with name %s."),k));
+ error(msprintf(gettext("Name conflict: it is not possible to save variable with name %s."),k));
end
end
clear("x","k","rhs","lhs","kk","err","sep","bin","version","mtlb_thefile","mtlb_opts");
function add_demo(demotitle,path)
global demolist
path=pathconvert(path,%f,%t)
- if fileinfo(path)==[] then error(gettext('errors','file: ')+path+gettext('errors',' do not exist.')),end
+ if fileinfo(path)==[] then error(gettext('file: ')+path+gettext(' do not exist.')),end
if isdir(path) then
- error(gettext('errors','second argument should give the path to a scilab script file.'));
+ error(gettext('second argument should give the path to a scilab script file.'));
end
k=find(demolist(:,1)==demotitle)
if k==[] then
// Allan CORNET INRIA 2004
-// Lance un script Perl
+// Launch a perl script
function [resultat,status] = perl(varargin)
Chainecmd = '';
lhs=argn(1);
rhs=argn(2);
if (rhs) then
- // Verification que le premier parametre est un fichier
+ // Check that the first param is a file
[x,ierr]=fileinfo(varargin(1));
if (x == []) then
- msgerr=gettext('errors','Unable to find Perl file: ')+string(varargin(1));
+ msgerr=gettext('Unable to find Perl file: ')+string(varargin(1));
error(msgerr);
else
- // Verification que les parametres sont des chaines de caracteres
+ // Check that params are strings
for i=1:1:rhs,
if ~(type(varargin(i)) == 10) then
- error(gettext('errors','All input arguments must be strings.'));
+ error(gettext('All input arguments must be strings.'));
end
idx=strindex(varargin(i),' ');
end
if (Chainecmd == '') then
- error(gettext('errors','No perl command specified.'));
+ error(gettext('No perl command specified.'));
else
if MSDOS then
- // Pour Windows
+ // For Windows
CheminPerl= fullfile(pathconvert(SCI,%f,%f,'w'),'\tools\perl\bin\');
[x,ierr]=fileinfo(CheminPerl+'perl.exe');
if (x == []) then
- msgerr=gettext('errors','Unable to find Perl in: ')+CheminPerl;
+ msgerr=gettext('Unable to find Perl in: ')+CheminPerl;
error(msgerr);
else
Chainecmd = 'perl'+' '+Chainecmd;
resultat=mgetl(TMPDIR+'\script');
end
else
- // Pour Linux
+ // For Linux
status = unix('which perl'+'>'+TMPDIR+'/pathperl');
pathperl=mgetl(TMPDIR+'/pathperl');
if (status == 0) then
status = unix(Chainecmd);
resultat=mgetl(TMPDIR+'\script');
else
- error(gettext('errors','Unable to find Perl.'));
+ error(gettext('Unable to find Perl.'));
end
end
end
if (status~=0) then
- msgerr= gettext('errors','System error: ')+ resultat+gettext('errors',' Command executed: ')+ Chainecmd;
+ msgerr= gettext('System error: ')+ resultat+gettext(' Command executed: ')+ Chainecmd;
error(msgerr);
end
end
else
- error(gettext('errors','First input argument must be a Perl File.'));
+ error(gettext('First input argument must be a Perl File.'));
end
endfunction
function [resultat,status] = powershell(varargin)
Chainecmd = '';
Chainecmdbegin = 'powershell.exe -nologo -inputformat text -outputformat text -Noninteractive ';
- resultat = [gettext('messages','error(s) : see help powershell'';''verify your script without scilab.')];
+ resultat = [gettext('error(s) : see help powershell'';''verify your script without scilab.')];
status = %f;
[lhs,rhs]=argn(0);
if (~MSDOS) then
- resultat = [gettext('messages','only for Windows.')];
+ resultat = [gettext('only for Windows.')];
return;
end
try
winqueryreg('HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\PowerShell\1','Install');
catch
- resultat = [gettext('messages','Powershell not found.')];
+ resultat = [gettext('Powershell not found.')];
return;
end
end
[resultat,status]=dos(Chainecmd);
else
- error(gettext('errors','Argument must be a string.'));
+ error(gettext('Argument must be a string.'));
end
else
- error(gettext('errors','Argument must be a string.'));
+ error(gettext('Argument must be a string.'));
end
endfunction
// Demos list is defined in scilab.start
deff('[]=demoex(num)','exec(demolist(num,2),-1)')
while %t then
- num=tk_choose(demolist(:,1),[gettext('menus','Click to choose a demo')]);
+ num=tk_choose(demolist(:,1),[gettext('Click to choose a demo')]);
if num==0 then
lines(oldln(1))
return
HomeDirectory=getenv('HOME',SCI);
if nv==1 then // to set Scilab home with a path
- warning(gettext('messages',' Obsolete: Define SCIHOME and HOME before to launch Scilab.'));
+ warning(gettext(' Obsolete: Define SCIHOME and HOME before to launch Scilab.'));
end
endfunction
//------------------------------------------------------------------------------
function [tf]=typeof(object)
// Copyright INRIA
select type(object)
-case 1 then tf=gettext('messages','constant');
-case 2 then tf=gettext('messages','polynomial');
-case 4 then tf=gettext('messages','boolean');
-case 5 then tf=gettext('messages','sparse');
-case 6 then tf=gettext('messages','boolean sparse');
-case 7 then tf=gettext('messages','Matlab sparse');
+case 1 then tf=gettext('constant');
+case 2 then tf=gettext('polynomial');
+case 4 then tf=gettext('boolean');
+case 5 then tf=gettext('sparse');
+case 6 then tf=gettext('boolean sparse');
+case 7 then tf=gettext('Matlab sparse');
case 8 then
it=inttype(object)
tf=''
it=modulo(it,10)
end
tf=tf+'int'+string(8*it)
-case 9 then tf=gettext('messages','handle');
-case 10 then tf=gettext('messages','string');
-case 11 then tf=gettext('messages','function');
-case 13 then tf=gettext('messages','function');
-case 14 then tf=gettext('messages','library');
-case 128 then tf=gettext('messages','pointer');
-case 129 then tf=gettext('messages','size implicit');
-case 15 then tf=gettext('messages','list');
+case 9 then tf=gettext('handle');
+case 10 then tf=gettext('string');
+case 11 then tf=gettext('function');
+case 13 then tf=gettext('function');
+case 14 then tf=gettext('library');
+case 128 then tf=gettext('pointer');
+case 129 then tf=gettext('size implicit');
+case 15 then tf=gettext('list');
case 16 then
o1=object(1);
select o1(1)
case 'r' then
- tf=gettext('messages','rational');
+ tf=gettext('rational');
case 'lss' then
- tf=gettext('messages','state-space');
+ tf=gettext('state-space');
else
tf=o1(1)
end
o1=getfield(1,object)
select o1(1)
case 'hm' then
- tf=gettext('messages','hypermat');
+ tf=gettext('hypermat');
else
tf=o1(1)
end
if k<>[] then
tf=nm(k(1))
else
- tf=gettext('messages','unknown');
+ tf=gettext('unknown');
end
end
endfunction
for k=2:nn
if mac(k)=='exec' then
txt=[txt;
- part(mac(k-1),1:lm)+gettext('messages',' called at line ')+string(linn(k))+gettext('messages',' of exec_file.')]
+ part(mac(k-1),1:lm)+gettext(' called at line ')+string(linn(k))+gettext(' of exec_file.')]
elseif mac(k)=='execstr' then
txt=[txt;
- part(mac(k-1),1:lm)+gettext('messages',' called at line ')+string(linn(k))+gettext('messages',' of execstr instruction.')]
+ part(mac(k-1),1:lm)+gettext(' called at line ')+string(linn(k))+gettext(' of execstr instruction.')]
elseif mac(k)=='pause' then
txt=[txt;
part(mac(k-1),1:lm)+' called under pause']
else
txt=[txt;
- part(mac(k-1),1:lm)+gettext('messages',' called at line ')+string(linn(k))+gettext('messages',' of macro ')+mac(k)]
+ part(mac(k-1),1:lm)+gettext(' called at line ')+string(linn(k))+gettext(' of macro ')+mac(k)]
end
end
write(%io(2),txt)
txt=[txt;strcat(nams(k:k-1+m))];
k=k+m;
end
-txt=[gettext('messages','User variables are:');
+txt=[gettext('User variables are:');
'';
txt;
'';
- gettext('messages','using ')+string(sum(mem))+gettext('messages',' elements out of ')+string(st(1)-(st(2)-sum(mem)))]
+ gettext('using ')+string(sum(mem))+gettext(' elements out of ')+string(st(1)-(st(2)-sum(mem)))]
write(%io(2),txt,'(1x,a)')
endfunction
//get the variables
[%_nams,%_vol]=who('get');
[%_lhs,%_rhs]=argn();
- if %_rhs==1 then error(gettext('errors','whos requires zeros or two arguments.')),end
+ if %_rhs==1 then error(gettext('whos requires zeros or two arguments.')),end
if %_rhs==2 then
%_nams($-1:$)=[],
if %_opt<>'-type'&%_opt<>'-name' then
- error(gettext('errors','First argument must be ''-name'' or ''-type''.'))
+ error(gettext('First argument must be ''-name'' or ''-type''.'))
end
end
//write the display header
if field=="contents" then
funcall.lhs(1).infer.contents=contlist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
if field=="contents" then
operation.out(1).infer.contents=contlist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
if field=="contents" then
variable.infer.contents=contlist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
elseif field=="property" then
val=m2scitlist.infer.type.property
else
- error(msprintf(gettext("errors","Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
+ error(msprintf(gettext("Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
end
endfunction
elseif field=="contents" then
val=m2scitlist.lhs(1).infer.contents
else
- error(msprintf(gettext("errors","Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
+ error(msprintf(gettext("Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
end
endfunction
elseif field=="contents" then
val=m2scitlist.lhs(1).infer.contents
else
- error(msprintf(gettext("errors","Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
+ error(msprintf(gettext("Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
end
endfunction
elseif field=="type" then
cste.infer.type=inslist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
elseif field=="type" then
funcall.lhs(1).type=inslist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
elseif field=="type" then
operation.out(1).type=inslist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
elseif field=="contents" then
var.infer.contents=inslist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
elseif field=="contents" then
val=m2scitlist.infer.contents
else
- error(msprintf(gettext("errors","Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
+ error(msprintf(gettext("Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
end
endfunction
elseif field=="contents" then
val=m2scitlist.out(1).infer.contents
else
- error(msprintf(gettext("errors","Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
+ error(msprintf(gettext("Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
end
endfunction
elseif field=="contents" then
val=m2scitlist.out(1).infer.contents
else
- error(msprintf(gettext("errors","Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
+ error(msprintf(gettext("Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
end
endfunction
elseif field=="property" then
op.type.property=cste
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
elseif field=="contents" then
var.infer.contents=cste
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
if field=="type" then
cste.infer.type=inslist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
if field=="type" then
funcall.lhs(1).type=inslist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
if field=="type" then
operation.out(1).type=inslist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
endfunction
if field=="type" then
var.infer=inslist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
elseif typeof(inslist)=="st" then
pause
var.infer=Infer(dims,Type())
var.infer.type=inslist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
else
if field=="type" then
var.infer.type=inslist
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
end
end
elseif field=="contents" then
val=m2scitlist.infer.contents
else
- error(msprintf(gettext("errors","Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
+ error(msprintf(gettext("Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
end
endfunction
elseif field=="contents" then
val=m2scitlist.infer.contents
else
- error(msprintf(gettext("errors","Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
+ error(msprintf(gettext("Extraction of %s from ''%s'' tlist is not yet implemented."),string(field),typeof(m2scitlist)))
end
endfunction
cont=tlist(fields,list(),list())
elseif nargs==2 then
if typeof(varargin(1))<>"list" then
- error(msprintf(gettext("errors","index must be a list instead of a: %s."),typeof(varargin(1))))
+ error(msprintf(gettext("index must be a list instead of a: %s."),typeof(varargin(1))))
end
if typeof(varargin(2))<>"list" then
- error(msprintf(gettext("errors","index must be a list instead of a: %s."),typeof(varargin(2))))
+ error(msprintf(gettext("index must be a list instead of a: %s."),typeof(varargin(2))))
end
cont=tlist(fields,varargin(1),varargin(2))
else
- error(gettext("errors","Wrong number of inputs."));
+ error(gettext("Wrong number of inputs."));
end
endfunction
rhs=argn(2)
if rhs~=1 then
- error(gettext("errors","Wrong number of inputs."));
+ error(gettext("Wrong number of inputs."));
end
dims=list()
rhs=argn(2)
if rhs<2 then
- error(gettext("errors","Wrong number of inputs."))
+ error(gettext("Wrong number of inputs."))
end
if rhs<3 then
endsymbol=";"
end
if typeof(lhslist)<>"list" then
- error(msprintf(gettext("errors","lhslist should be a list and not a: %s."),typeof(lhslist)));
+ error(msprintf(gettext("lhslist should be a list and not a: %s."),typeof(lhslist)));
end
if and(typeof(expression)<>["funcall","cste","operation","variable"]) then
disp(expression)
- error(msprintf(gettext("errors","expression can not be a: %s."),typeof(expression)))
+ error(msprintf(gettext("expression can not be a: %s."),typeof(expression)))
end
if type(endsymbol)<>10 then
- error(msprintf(gettext("errors","endsymbol should be a character string and not a: %s."),typeof(lhslist)));
+ error(msprintf(gettext("endsymbol should be a character string and not a: %s."),typeof(lhslist)));
end
eq=tlist(["equal","lhs","expression","endsymbol"],lhslist,expression,endsymbol)
// Verify input value
if rhs~=4 then
- error(gettext("errors","Wrong number of inputs."));
+ error(gettext("Wrong number of inputs."));
elseif typeof(name)~="string" then
- error(msprintf(gettext("errors","name must be a string instead of a: %s."),typeof(name)));
+ error(msprintf(gettext("name must be a string instead of a: %s."),typeof(name)));
elseif typeof(lhsnb)~="constant" then
- error(msprintf(gettext("errors","lhsnb must be a constant instead of a: %s."),typeof(lhsnb)));
+ error(msprintf(gettext("lhsnb must be a constant instead of a: %s."),typeof(lhsnb)));
elseif typeof(rhslist)~="list" & rhslist<>[] then
- error(msprintf(gettext("errors","rhslist must be a list instead of a: %s."),typeof(rhslist)));
+ error(msprintf(gettext("rhslist must be a list instead of a: %s."),typeof(rhslist)));
elseif typeof(lhslist)~="list" then
- error(msprintf(gettext("errors","lhslist must be a list instead of a: %s."),typeof(lhslist)));
+ error(msprintf(gettext("lhslist must be a list instead of a: %s."),typeof(lhslist)));
end
funcall_tlist=tlist(["funcall","name","lhsnb","rhs","lhs"],name,lhsnb,rhslist,lhslist)
infer=tlist(fields,list(Unknown,Unknown),Type(Unknown,Unknown),Contents())
elseif nargs==2 then
if typeof(varargin(1))<>"list" then
- error(msprintf(gettext("errors","dims must be a list instead of a: %s."),typeof(varargin(1))));
+ error(msprintf(gettext("dims must be a list instead of a: %s."),typeof(varargin(1))));
end
if typeof(varargin(2))<>"type" then
- error(msprintf(gettext("errors","type must be a ''type'' tlist instead of a: %s."),typeof(varargin(2))));
+ error(msprintf(gettext("type must be a ''type'' tlist instead of a: %s."),typeof(varargin(2))));
end
infer=tlist(fields,varargin(1),varargin(2),Contents())
elseif nargs==3 then // Should only be used for cells and structs
if typeof(varargin(1))<>"list" then
- error(msprintf(gettext("errors","dims must be a list instead of a: %s."),typeof(varargin(1))));
+ error(msprintf(gettext("dims must be a list instead of a: %s."),typeof(varargin(1))));
end
if typeof(varargin(2))<>"type" then
- error(msprintf(gettext("errors","type must be a ''type'' tlist instead of a: %s."),typeof(varargin(2))));
+ error(msprintf(gettext("type must be a ''type'' tlist instead of a: %s."),typeof(varargin(2))));
end
if typeof(varargin(3))<>"contents" then
- error(msprintf(gettext("errors","contents must be a ''contents'' tlist instead of a: %s."),typeof(varargin(3))));
+ error(msprintf(gettext("contents must be a ''contents'' tlist instead of a: %s."),typeof(varargin(3))));
end
infer=tlist(fields,varargin(1),varargin(2),varargin(3))
end
rhs=argn(2)
if rhs<3 then
- error(gettext("errors","Wrong number of inputs."))
+ error(gettext("Wrong number of inputs."))
end
if rhs==3 then
call_level=0
end
if typeof(sciname)~="string" then
- error(msprintf(gettext("errors","sciname must be a string instead of a: %s."),typeof(sciname)));
+ error(msprintf(gettext("sciname must be a string instead of a: %s."),typeof(sciname)));
elseif typeof(matname)~="string" then
- error(msprintf(gettext("errors","matname must be a string instead of a: %s."),typeof(matname)));
+ error(msprintf(gettext("matname must be a string instead of a: %s."),typeof(matname)));
elseif typeof(infer)~="infer" then
- error(msprintf(gettext("errors","infer must be an ''infer'' tlist instead of a: %s."),typeof(infer)));
+ error(msprintf(gettext("infer must be an ''infer'' tlist instead of a: %s."),typeof(infer)));
end
var=tlist(["m2scivar","sciname","matname","infer","level"],sciname,matname,infer,call_level)
// Verify input value
if rhs~=3 then
- error(gettext("errors","Wrong number of inputs."))
+ error(gettext("Wrong number of inputs."))
end
if typeof(operator)~="string" then
- error(msprintf(gettext("errors","operator must be a string instead of a: %s."),typeof(operator)));;
+ error(msprintf(gettext("operator must be a string instead of a: %s."),typeof(operator)));;
elseif typeof(operands)~="list" then
- error(msprintf(gettext("errors","operands must be a list instead of a: %s."),typeof(operands)));
+ error(msprintf(gettext("operands must be a list instead of a: %s."),typeof(operands)));
elseif typeof(out)~="list" then
- error(msprintf(gettext("errors","out must be a list instead of a: %s."),typeof(out)));
+ error(msprintf(gettext("out must be a list instead of a: %s."),typeof(out)));
end
operation_tlist=tlist(["operation","operator","operands","out"],operator,operands,out)
end
if and(vtype~=[Double,Boolean,String,Unknown,Sparse,Cell,Struct,Int,Handle]) then
- error(msprintf(gettext("errors","%s is not yet implemented."),string(vtype)))
+ error(msprintf(gettext("%s is not yet implemented."),string(vtype)))
end
if typeof(property)=="list" then
- error(gettext("errors","list of properties is not yet implemented."))
+ error(gettext("list of properties is not yet implemented."))
elseif and(property~=[Real,Complex,Unknown]) then
- error(msprintf(gettext("errors","wrong property %s."),string(property)))
+ error(msprintf(gettext("wrong property %s."),string(property)))
end
Type_tlist=tlist(["type","vtype","property"],vtype,property)
rhs=argn(2)
if rhs<>2 then
- error(gettext("errors","Wrong number of inputs."))
+ error(gettext("Wrong number of inputs."))
end
if typeof(name)~="string" then
- error(msprintf(gettext("errors","name must be a string instead of a: %s."),typeof(name)))
+ error(msprintf(gettext("name must be a string instead of a: %s."),typeof(name)))
elseif typeof(infer)~="infer" then
- error(msprintf(gettext("errors","infer must be an ''infer'' tlist instead of a: %s."),typeof(infer)))
+ error(msprintf(gettext("infer must be an ''infer'' tlist instead of a: %s."),typeof(infer)))
end
var=tlist(["variable","name","infer"],name,infer)
// Create Scilab while
sci_clause=tlist(["for","expression","statements"],sci_expr,sci_instr)
else
- error(msprintf(gettext("errors","unknown clause type: %s."),typeof(mtlb_clause)))
+ error(msprintf(gettext("unknown clause type: %s."),typeof(mtlb_clause)))
end
m2sci_to_insert_b=to_insert
if m2sci_to_insert_b<>list() then
lhslist($+1)=Variable("ans",Infer(A.dims,Type(Double,Unknown)))
dble=Funcall("mtlb_double",1,Rhs(A),lhslist)
else
- error(msprintf(gettext("errors","%s is not yet implemented."),string(A.vtype)))
+ error(msprintf(gettext("%s is not yet implemented."),string(A.vtype)))
end
end
endfunction
[mtlbpath,ismtlbtoolfun]=mtlbtoolfun(name)
//Matlab reference functions
if or(name==not_yet_converted()) then
- set_infos(msprintf(gettext("messages","Matlab function %s not yet converted, original calling sequence used."),name),2)
+ set_infos(msprintf(gettext("Matlab function %s not yet converted, original calling sequence used."),name),2)
if ~or(name==mtlbref_fun(:,1)) then
mtlbref_fun($+1,1)=name
if ispriminame then
- mtlbref_fun($,2)=msprintf(gettext("messages","(Warning name conflict: function name changed from %s to %s)."),name,name1);
+ mtlbref_fun($,2)=msprintf(gettext("(Warning name conflict: function name changed from %s to %s)."),name,name1);
else
mtlbref_fun($,2)=""
end
end
//Matlab toolboxes functions
elseif ismtlbtoolfun then
- set_infos(msprintf(gettext("messages","OFF6"),name),2)
+ set_infos(msprintf(gettext("OFF6"),name),2)
if ~or(name==mtlbtool_fun(:,1)) then
mtlbtool_fun($+1,1)=name
if ispriminame then
- mtlbtool_fun($,2)=msprintf(gettext("messages","Matlab toolbox(es) function %s not converted, original calling sequence used."),name,name1,mtlbpath)
+ mtlbtool_fun($,2)=msprintf(gettext("Matlab toolbox(es) function %s not converted, original calling sequence used."),name,name1,mtlbpath)
else
- mtlbtool_fun($,2)=msprintf(gettext("messages","(Find this function in matlab/%s)."),mtlbpath)
+ mtlbtool_fun($,2)=msprintf(gettext("(Find this function in matlab/%s)."),mtlbpath)
end
end
elseif isdefinedvar(Variable(tree.name,Infer())) then
//Not matlbb function
else
- set_infos(msprintf(gettext("messages","Unknown function %s not converted, original calling sequence used."),name),2)
+ set_infos(msprintf(gettext("Unknown function %s not converted, original calling sequence used."),name),2)
if ~or(name==not_mtlb_fun(:,1)) then
not_mtlb_fun($+1,1)=name
if ispriminame then
- not_mtlb_fun($,2)=msprintf(gettext("messages","(Warning name conflict: function name changed from %s to %s)."),name,name1);
+ not_mtlb_fun($,2)=msprintf(gettext("(Warning name conflict: function name changed from %s to %s)."),name,name1);
else
not_mtlb_fun($,2)=""
end
end
end
if ispriminame then
- set_infos(msprintf(gettext("messages","(Warning name conflict: function name changed from %s to %s)."),name,name1),0)
+ set_infos(msprintf(gettext("(Warning name conflict: function name changed from %s to %s)."),name,name1),0)
end
[tree]=sci_generic(tree)
endfunction
lhslist($+1)=Variable(mtlb_instr.lhs(k).name,INFER)
elseif typeof(mtlb_instr.lhs(k))=="operation" then
if mtlb_instr.lhs(k).operator<>"ins" then
- error(msprintf(gettext("errors","lhs cannot be a %s operation."),mtlb_instr.lhs(k).operator))
+ error(msprintf(gettext("lhs cannot be a %s operation."),mtlb_instr.lhs(k).operator))
end
[bval,index]=isdefinedvar(mtlb_instr.lhs(k).operands(1))
mtlb_instr.lhs(k).operands,..
list(Variable(mtlb_instr.lhs(k).operands(1).name,INFER)))
else
- error(msprintf(gettext("errors","lhs cannot be a %s."),typeof(mtlb_instr.lhs(k))))
+ error(msprintf(gettext("lhs cannot be a %s."),typeof(mtlb_instr.lhs(k))))
end
end
sci_instr.lhs(1).dims=sci_expr.dims;
sci_instr.lhs(1).type=sci_expr.type;
else
- error(msprintf(gettext("errors","%s is not yet implemented."),typeof(sci_instr.expression)));
+ error(msprintf(gettext("%s is not yet implemented."),typeof(sci_instr.expression)));
end
// If lhs are insertion operation, they also have to be converted
elseif typeof(mtlb_expr(k))=="funcall" then
[mtlb_expr(k)]=expression2sci(mtlb_expr(k),lhslist)
else
- error(msprintf(gettext("errors","recursive extraction with one index of type %s is not yet implemented."),typeof(mtlb_expr(k))))
+ error(msprintf(gettext("recursive extraction with one index of type %s is not yet implemented."),typeof(mtlb_expr(k))))
end
end
sci_expr=mtlb_expr
// --- Expression is a not tolerated tlist ---
else
- error(msprintf(gettext("errors","%s is not yet implemented."),typeof(mtlb_expr)))
+ error(msprintf(gettext("%s is not yet implemented."),typeof(mtlb_expr)))
end
// Verify if flag for translation improvements has to be set
getf(sci_file)
ierr=execstr("[sci_equiv]=sci_"+mtlb_expr.name+"(mtlb_expr)","errcatch");
if ierr<>0 then
- error(msprintf(gettext("errors","Error while executing : [sci_equiv]=sci_%s(mtlb_expr)."),mtlb_expr.name));
+ error(msprintf(gettext("Error while executing : [sci_equiv]=sci_%s(mtlb_expr)."),mtlb_expr.name));
end
else
sci_equiv=default_trad(mtlb_expr)
for i=2:size(findvect,2)
st = st+ " <-> " + fnamvect(findvect(i))
end
- st = st + gettext("messages",": The 24 first characters of the files names are equal: ");
+ st = st + gettext(": The 24 first characters of the files names are equal: ");
warning(st)
end
end
// Check if it is a Matlab function not converted yet
if or(varname==not_yet_converted()) then
- set_infos(msprintf(gettext("messages","Matlab function %s not yet converted."),varname),2)
+ set_infos(msprintf(gettext("Matlab function %s not yet converted."),varname),2)
tmpvar=Variable(varname,Infer())
sci_equiv=Funcall("mtlb",1,Rhs(tmpvar),lhslist)
else
// Other cases: I am not able to determine what is nam
- set_infos(msprintf(gettext("messages","mtlb(%s) can be replaced by %s() or %s whether %s is an M-file or not."),varname,varname,varname,varname),1)
+ set_infos(msprintf(gettext("mtlb(%s) can be replaced by %s() or %s whether %s is an M-file or not."),varname,varname,varname,varname),1)
tmpvar=Variable(varname,Infer())
sci_equiv=Funcall("mtlb",1,Rhs(tmpvar),lhslist)
end
varargout=list()
if typeof(op_tree)<>"operation" then
- error(gettext("errors","input argument must be an ''operation'' tlist."))
+ error(gettext("input argument must be an ''operation'' tlist."))
end
opnb=size(op_tree.operands)
varargout=list()
if typeof(instr_tree)<>"funcall" then
- error(gettext("errors","Wrong input argument in getrhs() (Must be a ''funcall'' tlist)."))
+ error(gettext("Wrong input argument in getrhs() (Must be a ''funcall'' tlist)."))
end
rhsnb=size(instr_tree.rhs)
rhs=argn(2)
if rhs<>2 then
- error(gettext("errors","Wrong number of inputs."))
+ error(gettext("Wrong number of inputs."))
end
// Search variable name in variable name table
if isanmfile(varname) then
// A M-file without parameter
if verbose_mode<0 then
- m2sci_info(msprintf(gettext("messages","L.%d: Unknown variable %s is a M-file."),nblines,varname),-1);
+ m2sci_info(msprintf(gettext("L.%d: Unknown variable %s is a M-file."),nblines,varname),-1);
end
sci_equiv=Funcall(varname,size(lhslist),list(),lhslist)
elseif exists("sci_"+varname)==1 then
// A translated function without parameter
if verbose_mode<0 then
- m2sci_info(msprintf(gettext("messages","L.%d: Unknown variable %s is a M-file (sci_%s exists)."),nblines,varname,varname),-1);
+ m2sci_info(msprintf(gettext("L.%d: Unknown variable %s is a M-file (sci_%s exists)."),nblines,varname,varname),-1);
end
sci_equiv=Funcall(varname,size(lhslist),list(),lhslist)
elseif or(varname==["i","j"]) then
if verbose_mode<0 then
- m2sci_info(msprintf(gettext("messages","Variable %s supposed to be the Imaginary unit."),varname),-1);
+ m2sci_info(msprintf(gettext("Variable %s supposed to be the Imaginary unit."),varname),-1);
end
sci_equiv=Variable("%i",Infer(list(1,1),Type(Double,Complex)))
else
// Try to find what is 'varname'
sci_equiv=get_unknown(varname,lhslist)
if verbose_mode<0 then
- m2sci_info(msprintf(gettext("messages","L.%d: Unknown variable %s."),nblines,varname),-1);
+ m2sci_info(msprintf(gettext("L.%d: Unknown variable %s."),nblines,varname),-1);
end
end
else
dims=[dims,string(infer.dims(l))]
end
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
dims=strcat(dims," ")
[converted_instr]=mtlb_instr
else
- error(gettext("errors","unknown instruction type %s."),typeof(mtlb_instr))
+ error(gettext("unknown instruction type %s."),typeof(mtlb_instr))
end
endfunction
// If input is a string
if type(var)==10 then
if and(var<>["i","j","pi","eps","%nargin","%nargout"]) then
- warning(msprintf(gettext("messages","Bad use of isdefinedvar() with input: %s."),var))
+ warning(msprintf(gettext("Bad use of isdefinedvar() with input: %s."),var))
return
end
varname=var
end
mkdir(pathconvert(TMPDIR),fnam)
- write(%io(2),msprintf(gettext("messages"," -- File %s contains more than one function -- "),fil));
+ write(%io(2),msprintf(gettext(" -- File %s contains more than one function -- "),fil));
// First split file into as many files as function declared
funcdecl=[funcdecl size(txt,"*")+1]
tmpfiles=[]
mputl(functxt,pathconvert(TMPDIR)+pathconvert(fnam)+tmpfiles($)+".m")
end
end
- write(%io(2),msprintf(gettext("messages"," -- Each function converted separately: %s -- "),strcat(tmpfiles," ")));
- write(%io(2),msprintf(gettext("messages"," -- Temporary files put in: %s -- "),pathconvert(TMPDIR)));
+ write(%io(2),msprintf(gettext(" -- Each function converted separately: %s -- "),strcat(tmpfiles," ")));
+ write(%io(2),msprintf(gettext(" -- Temporary files put in: %s -- "),pathconvert(TMPDIR)));
// Conversion of each file
//for k=1:size(tmpfiles,"*")
[lhs,rhs]=argn(0)
if rhs==1 then
- error(gettext("errors","Wrong number of inputs."))
+ error(gettext("Wrong number of inputs."))
end
if rhs==2 then Recmode=%f,end
// Add special code
// If nargin or nargout function is used
if isdefinedvar("%nargin") | isdefinedvar("%nargout") then
- dcl=["";gettext("messages","// Number of arguments in function call");"[%nargout,%nargin] = argn(0)"]
+ dcl=["";gettext("// Number of arguments in function call");"[%nargout,%nargin] = argn(0)"]
end
// Set display mode equivalent to Matlab echo off
-dcl=[dcl;"";gettext("messages","// Display mode");"mode(0);"]
+dcl=[dcl;"";gettext("// Display mode");"mode(0);"]
// Set flotting point exception mode
-dcl=[dcl;"";gettext("messages","// Display warning for floating point exception");"ieee(1);"]
+dcl=[dcl;"";gettext("// Display warning for floating point exception");"ieee(1);"]
// Initial value of lhs arguments
// If they are not initialized by input value, they are initialized with []
end
// Graphics init
-//graph_ini=[gettext("messages","// Graphics initialisation");"global %graphics";"%graphics.type=1";"%graphics.units=""pixels"""];
+//graph_ini=[gettext("// Graphics initialisation");"global %graphics";"%graphics.type=1";"%graphics.units=""pixels"""];
graph_ini=[]
if ini<>[] then
- ini=["";gettext("messages","// Ouput variables initialisation (not found in input variables)");ini]
+ ini=["";gettext("// Ouput variables initialisation (not found in input variables)");ini]
end
//ini=[ini;" ";graph_ini]
// Info on macros variables
if verbose_mode<0 then
- write(%io(2),gettext("messages","TESTING M2SCI: creating varslist file..."))
+ write(%io(2),gettext("TESTING M2SCI: creating varslist file..."))
n=size(varslist)
info=[]
if batch then
trad=[
"function [tree] = sci_"+fnam+"(tree)"
- msprintf(gettext("messages","// Generated by M2SCI"),fnam)
+ msprintf(gettext("// Generated by M2SCI"),fnam)
""
"tree=Funcall(""exec"",1,Rhs(tree.name),tree.lhs)"
]
else
trad=[
"function [tree] = sci_"+nam+"(tree)"
- msprintf(gettext("messages","// Copyright INRIA (Generated by M2SCI)"),nam)
+ msprintf(gettext("// Copyright INRIA (Generated by M2SCI)"),nam)
]
if maclhs==0 then // Function with no ouputs
vtype="vtype="+sci2exp(vtype)
prop="prop="+sci2exp(prop)
trad=[trad;
- gettext("messages","// dims(i,:) is the ith output argument dimensions vector")
+ gettext("// dims(i,:) is the ith output argument dimensions vector")
dims
- gettext("messages","// dims(i,:) is the ith output argument dimensions vector")
+ gettext("// dims(i,:) is the ith output argument dimensions vector")
vtype
- gettext("messages","// prop(i) is the ith output argument property")
+ gettext("// prop(i) is the ith output argument property")
prop]
if mtlbtree.outputs($).name<>"varargout" then
trad=[trad;
" tree.lhs(k).vtype=vtype(k)"
" tree.lhs(k).property=prop(k)"
"end"
- gettext("messages","// Inference for varargout")
+ gettext("// Inference for varargout")
"for k=min(lstsize(dims),lhs)+1:lhs"
" tree.lhs(k).dims=list(Unknown,Unknown)"
" tree.lhs(k).vtype=Unknown"
if verb_mode>0 then
if exists("m2sci_to_insert_b")==0 then
- write(%io(2),gettext("messages","loginfos: verb_mode 0 should not be used in this context, information ignored."));
+ write(%io(2),gettext("loginfos: verb_mode 0 should not be used in this context, information ignored."));
return
end
global("m2sci_to_insert_b")
com=strsubst(com,dquote,dquote+dquote)
if part(com,1:12)=="m2sciassume " | part(com,1:13)=="m2scideclare " then // User has given a clue to help translation
if part(com,1:12)=="m2sciassume " then
- warning(gettext("messages","m2sciassume is obsolete, used m2scideclare instead."));
+ warning(gettext("m2sciassume is obsolete, used m2scideclare instead."));
end
com=";m2scideclare("+quote+part(com,13:length(com))+quote+")"
else
//mtlbpath : the path where is the function in the matlab toolbox (if it is in matlab)
//ismtlb : boolean, true if the function is in a matlab toolbox
//F.B
-mtlbpath=gettext("messages","not matlab path");
+mtlbpath=gettext("not matlab path");
ismtlb=%f
//tb : table which contains all the matlab functions(exept the matlab function reference) and their access path
tmpvarnb=0
if typeof(mtlbtree)<>"program" then
- error(gettext("errors","wrong type of input."))
+ error(gettext("wrong type of input."))
end
// Init Scilab tree
nblines=1 // Number of converted lines
end
-m2sci_info(gettext("messages","Conversion of M-tree..."),-1);
+m2sci_info(gettext("Conversion of M-tree..."),-1);
// Default value
rhs = argn(2);
crp=cat_code(crp,"");
end
-m2sci_info(gettext("messages","Conversion of M-tree: Done"),-1);
+m2sci_info(gettext("Conversion of M-tree: Done"),-1);
clearglobal("m2sci_to_insert_b")
rmdir(pathconvert(TMPDIR)+base_name,'s')
end
mkdir(pathconvert(TMPDIR),base_name)
- write(%io(2),msprintf(gettext("messages"," -- File %s contains more than one function -- "),fil));
+ write(%io(2),msprintf(gettext(" -- File %s contains more than one function -- "),fil));
bval= %t
mputl(functxt,pathconvert(TMPDIR)+base_name+sep+tmpfiles($)+".m")
end
- write(%io(2),msprintf(gettext("messages"," -- Each function converted separately: %s -- "),strcat(tmpfiles," ")));
- write(%io(2),msprintf(gettext("messages"," -- Temporary files put in: %s -- "),pathconvert(TMPDIR)));
+ write(%io(2),msprintf(gettext(" -- Each function converted separately: %s -- "),strcat(tmpfiles," ")));
+ write(%io(2),msprintf(gettext(" -- Temporary files put in: %s -- "),pathconvert(TMPDIR)));
// Conversion of each file
function []=no_equiv(expr)
// Copyright INRIA
-set_infos(msprintf(gettext("messages","No Scilab equivalent for: %s"),expr),2)
+set_infos(msprintf(gettext("No Scilab equivalent for: %s"),expr),2)
endfunction
end
end
if ind==-1 then
- error(msprintf(gettext("errors","operator %s not found."),mtlb_expr.operator))
+ error(msprintf(gettext("operator %s not found."),mtlb_expr.operator))
end
rhs=size(mtlb_expr.operands)
execstr("[sci_equiv]=%"+ops(ind,2)+"2sci(mtlb_expr)");
nposs=size(varargin)
if nposs==0 | fix(nposs/3)*3~=nposs then
- error(gettext("errors","Wrong number of inputs."))
+ error(gettext("Wrong number of inputs."))
end
-txt=[expression2code(expr)+gettext("messages"," may be replaced by:")]
+txt=[expression2code(expr)+gettext(" may be replaced by:")]
for k=1:3:nposs
vars=""
if typeof(varargin(k+1))<>"list" then
end
txt=[
txt
- " --> "+expression2code(varargin(k))+" "+gettext("messages","if")+" "+vars+" "+varargin(k+2)]
+ " --> "+expression2code(varargin(k))+" "+gettext("if")+" "+vars+" "+varargin(k+2)]
end
set_infos(txt,1)
nbsep=size(seppos,"*")
if nbsep<3 then
- error(gettext("errors","not enough data, you should give at least variable_name|dimensions|datatype."));
+ error(gettext("not enough data, you should give at least variable_name|dimensions|datatype."));
elseif nbsep>4 then
- error(gettext("errors","too much data."));
+ error(gettext("too much data."));
end
name=stripblanks(part(userdata,1:seppos(1)-1))
datatype=convstr(part(datatype,1),"u")+convstr(part(datatype,2:length(datatype)),"l")
vtype=evstr(datatype)
else
- error(msprintf(gettext("errors","Unknown datatype %s."),datatypetxt));
+ error(msprintf(gettext("Unknown datatype %s."),datatypetxt));
end
// Property
prop=convstr(part(prop,1),"u")+part(prop,2:length(prop))
property=evstr(prop)
else
- error(msprintf(gettext("errors","Unknown property %s."),proptxt));
+ error(msprintf(gettext("Unknown property %s."),proptxt));
end
// Property correction
if or(vtype==[Boolean,String]) then
if ~isempty(strindex(part(name,min(strindex(name,"(")):min(strindex(name,")"))),"*")) then // Generic command *
vardims="generic"
else
- error(gettext("errors","Wrong dimensions user data."));
+ error(gettext("Wrong dimensions user data."));
end
end
else
// Update dimensions
if err then
- set_infos(msprintf(gettext("messages","Dimensions current value and m2scideclare statements conflict for: %s"),varname,dims2str(vardims),dims2str(infereddims)),2)
+ set_infos(msprintf(gettext("Dimensions current value and m2scideclare statements conflict for: %s"),varname,dims2str(vardims),dims2str(infereddims)),2)
else
varslist(index)=M2scivar(varslist(index).matname,varslist(index).matname,Infer(vardims,Type(varslist(index).type.vtype,property)))
end
if varslist(index).type.vtype==Unknown then
varslist(index)=M2scivar(varslist(index).matname,varslist(index).matname,Infer(vardims,Type(vartype,varslist(index).property)))
elseif varslist(index).type.vtype~=vartype then
- set_infos(msprintf(gettext("messages","Type current value and m2scideclare statements conflict for: %s"),varname,tp2str(vartype),tp2str(varslist(index).type.vtype)),2)
+ set_infos(msprintf(gettext("Type current value and m2scideclare statements conflict for: %s"),varname,tp2str(vartype),tp2str(varslist(index).type.vtype)),2)
end
// Update property
elseif property==Unknown then
varslist(index).type.property=Unknown
elseif varslist(index).type.property~=property then
- set_infos(msprintf(gettext("messages","Property current value and m2scideclare statements conflict for: %s"),name,prop2str(Unknown),prop2str(varslist(index).type.property)),2)
+ set_infos(msprintf(gettext("Property current value and m2scideclare statements conflict for: %s"),name,prop2str(Unknown),prop2str(varslist(index).type.property)),2)
end
// Update contents (no verification made...too complex)
if name=="%graphicswindow" then
global %graphicswindow
if and(vtype<>[Handle,Double]) then
- set_infos(gettext("messages","%graphicswindow set to default value Handle."),2);
+ set_infos(gettext("%graphicswindow set to default value Handle."),2);
else
%graphicswindow=vtype
end
end
if err then
- set_infos(msprintf(gettext("messages","Dimensions current value and m2scideclare statements conflict for: %s"),name,dims2str(dims),dims2str(infereddims)),2)
+ set_infos(msprintf(gettext("Dimensions current value and m2scideclare statements conflict for: %s"),name,dims2str(dims),dims2str(infereddims)),2)
else
varslist(index)=M2scivar(varslist(index).matname,varslist(index).sciname,Infer(dims,varslist(index).type))
end
if varslist(index).type.vtype==Unknown then
varslist(index)=M2scivar(varslist(index).matname,varslist(index).sciname,Infer(varslist(index).dims,Type(vtype,varslist(index).type.property)))
elseif varslist(index).type.vtype~=vtype then
- set_infos(msprintf(gettext("messages","Type current value and m2scideclare statements conflict for: %s"),name,tp2str(vtype),tp2str(varslist(index).type.vtype)),2)
+ set_infos(msprintf(gettext("Type current value and m2scideclare statements conflict for: %s"),name,tp2str(vtype),tp2str(varslist(index).type.vtype)),2)
end
// Update property
if varslist(index).type.property==Unknown then
varslist(index)=M2scivar(varslist(index).matname,varslist(index).sciname,Infer(varslist(index).dims,Type(varslist(index).type.vtype,property)))
elseif varslist(index).type.property~=property then
- set_infos(msprintf(gettext("messages","Property current value and m2scideclare statements conflict for: %s"),name,prop2str(property),prop2str(varslist(index).type.property)),2)
+ set_infos(msprintf(gettext("Property current value and m2scideclare statements conflict for: %s"),name,prop2str(property),prop2str(varslist(index).type.property)),2)
end
end
end
elseif tp==-1 then
str="Unknown"
else
- error(msprintf(gettext("errors","type %d is not implemented."),tp))
+ error(msprintf(gettext("type %d is not implemented."),tp))
end
endfunction
elseif prop==-1 then
str="Unknown"
else
- error(msprintf(gettext("errors","type %d is not implemented."),prop))
+ error(msprintf(gettext("type %d is not implemented."),prop))
end
endfunction
// Call m2sci.tcl to get file or path to convert using M2SCI and user defined options
if ~with_tk() then
- error(gettext("errors","Tcl/Tk interface not defined."));
+ error(gettext("Tcl/Tk interface not defined."));
end
// Default Options and Values
TCL_SetVar("ePathToConvert",getcwd());
-TCL_SetVar("eFileToConvert",gettext("menus","<enter a file name>"));
+TCL_SetVar("eFileToConvert",gettext("<enter a file name>"));
TCL_SetVar("eResDirName",getcwd());
-TCL_SetVar("rRecMode",gettext("messages","NO"));
-TCL_SetVar("rOnlyDouble",gettext("messages","NO"));
+TCL_SetVar("rRecMode",gettext("NO"));
+TCL_SetVar("rOnlyDouble",gettext("NO"));
TCL_SetVar("rVerbMode","3");
-TCL_SetVar("rPrettyPrint",gettext("messages","NO"));
+TCL_SetVar("rPrettyPrint",gettext("NO"));
TCL_SetVar("rFlagWhatToConvert","0");
TCL_SetVar("rToDo","0");
TCL_SetVar("rWindowKilled","0");
FlagWhatToConvert=TCL_GetVar("rFlagWhatToConvert");
// Modify Tcl/Tk values
- if RecMode==gettext("messages","YES") then
+ if RecMode==gettext("YES") then
RecMode=%T
else
RecMode=%F
end
- if OnlyDouble==gettext("messages","YES") then
+ if OnlyDouble==gettext("YES") then
OnlyDouble=%T
else
OnlyDouble=%F
end
- if PrettyPrint==gettext("messages","YES") then
+ if PrettyPrint==gettext("YES") then
PrettyPrint=%T
else
PrettyPrint=%F
margin=part(" ",ones(1,3*(Reclevel-1)))
margin=" "
-rec=gettext("messages","OFF");
-dble=gettext("messages","NO");
-pretty=gettext("messages","NO");
-if prettyprint then pretty=gettext("messages","YES");end
-if Recmode then rec=gettext("messages","ON");end
-if only_double then dble=gettext("messages","YES");end
+rec=gettext("OFF");
+dble=gettext("NO");
+pretty=gettext("NO");
+if prettyprint then pretty=gettext("YES");end
+if Recmode then rec=gettext("ON");end
+if only_double then dble=gettext("YES");end
res=[]
// logfile initialisation
if exists("logfile")==0 then
- [tempfd1,ierr1]=file('open',pathconvert(TMPDIR)+gettext("messages","m2sci_message_5"),"old")
+ [tempfd1,ierr1]=file('open',pathconvert(TMPDIR)+gettext("m2sci_message_5"),"old")
if ierr1==0 then
- load(pathconvert(TMPDIR)+gettext("messages","m2sci_message_5"))
+ load(pathconvert(TMPDIR)+gettext("m2sci_message_5"))
file('close',tempfd1)
file('close',logfile)
- mdelete(pathconvert(TMPDIR)+gettext("messages","m2sci_message_5"))
+ mdelete(pathconvert(TMPDIR)+gettext("m2sci_message_5"))
end
logfile=file('open',res_path+"m2sci_"+fnam+".log","unknown")
- save(pathconvert(TMPDIR)+gettext("messages","m2sci_message_5"),logfile)
+ save(pathconvert(TMPDIR)+gettext("m2sci_message_5"),logfile)
end
// Output beginning message
-mss=[gettext("messages","****** Beginning of mfile2sci() session ******");
- gettext("messages","File to convert:")+" "+fil;
- gettext("messages","Result file path:")+" "+res_path;
- gettext("messages","Recursive mode:")+" "+rec;
- gettext("messages","Only double values used in M-file:")+" "+dble;
- gettext("messages","Verbose mode:")+" "+string(verbose_mode);
- gettext("messages","Generate formated code:")+" "+pretty]
+mss=[gettext("****** Beginning of mfile2sci() session ******");
+ gettext("File to convert:")+" "+fil;
+ gettext("Result file path:")+" "+res_path;
+ gettext("Recursive mode:")+" "+rec;
+ gettext("Only double values used in M-file:")+" "+dble;
+ gettext("Verbose mode:")+" "+string(verbose_mode);
+ gettext("Generate formated code:")+" "+pretty]
m2sci_info(mss,-1);
// Read in the file as text
-m2sci_info(gettext("messages","M-file reading..."),-1);
+m2sci_info(gettext("M-file reading..."),-1);
txt=mgetl(fil);
-m2sci_info(gettext("messages","M-file reading: Done"),-1);
+m2sci_info(gettext("M-file reading: Done"),-1);
//Replace TAB by SPACE
txt=strsubst(txt,code2str(-40),"")
if txt==[] then
- m2sci_infos(msprintf(gettext("messages","File %s is an empty file ! Nothing done..."),fil),-1);
+ m2sci_infos(msprintf(gettext("File %s is an empty file ! Nothing done..."),fil),-1);
return
end
tmptxt=txt
// Make minor changes on syntax
-m2sci_info(gettext("messages","Syntax modification..."),-1);
+m2sci_info(gettext("Syntax modification..."),-1);
ierr=execstr("load(''"+pathconvert(TMPDIR)+fnam+ ".tree'',''txt'',''helppart'',''batch'')",'errcatch','n')
if ierr<>0 | exists('txt')==0 | exists('batch')==0 & strindex(res_path,TMPDIR)==[] then
[helppart,txt,batch]=m2sci_syntax(txt)
[helppart,txt,batch]=m2sci_syntax(tmptxt)
end
-m2sci_info(gettext("messages","Syntax modification: Done"),-1);
+m2sci_info(gettext("Syntax modification: Done"),-1);
// Write .cat file and update whatis
if helppart<>[] then
mname=w(1);
nametbl=[nametbl;mname]
if fnam<>mname & ~batch then // warning is not displayed for a batch file
- mss=msprintf(gettext("messages","Warning: file %s defines function %s instead of %s"),fil,mname,fnam,mname,mname,mname);
+ mss=msprintf(gettext("Warning: file %s defines function %s instead of %s"),fil,mname,fnam,mname,mname,mname);
m2sci_info(mss,-1);
end
funcprot(fprot)
// Get Scilab pseudo code of the function
- m2sci_info(gettext("messages","Macro to tree conversion..."),-1);
+ m2sci_info(gettext("Macro to tree conversion..."),-1);
macr=evstr(mname)
mtlbtree=macr2tree(macr);
if ~batch then
// if mtlbref_fun<>[]|not_mtlb_fun<>[]|mtlbtool_fun<>[] then
//resume_logfile initialisation
if exists("resume_logfile")==0 then
- [tempfd2,ierr2]=file('open',pathconvert(TMPDIR)+gettext("messages","resumelogfile.dat"),"old")
+ [tempfd2,ierr2]=file('open',pathconvert(TMPDIR)+gettext("resumelogfile.dat"),"old")
if ierr2==0 then
- load(pathconvert(TMPDIR)+gettext("messages","resumelogfile.dat"))
+ load(pathconvert(TMPDIR)+gettext("resumelogfile.dat"))
file('close',tempfd2)
file('close',resume_logfile)
- mdelete(pathconvert(TMPDIR)+gettext("messages","resumelogfile.dat"))
+ mdelete(pathconvert(TMPDIR)+gettext("resumelogfile.dat"))
end
- resume_logfile=file('open',res_path+gettext("messages","resume")+"_m2sci_"+fnam+".log",'unknown')
- save(pathconvert(TMPDIR)+gettext("messages","resumelogfile.dat"),resume_logfile)
+ resume_logfile=file('open',res_path+gettext("resume")+"_m2sci_"+fnam+".log",'unknown')
+ save(pathconvert(TMPDIR)+gettext("resumelogfile.dat"),resume_logfile)
end
//number of matlab reference functions, matlab toolboxes functions, not matlab functions
not_mtlb_fun(:,1)=""""+not_mtlb_fun(:,1)+""""
end
- info_resume=[msprintf(gettext("messages","****** %s: Functions of mfile2sci() session ******"),fnam);
+ info_resume=[msprintf(gettext("****** %s: Functions of mfile2sci() session ******"),fnam);
"*";
- msprintf(gettext("messages","%d Matlab Function(s) not yet converted, original calling sequence used:"),size1);
+ msprintf(gettext("%d Matlab Function(s) not yet converted, original calling sequence used:"),size1);
mtlbref_fun(:,1)+mtlbref_fun(:,2);
"*";
- msprintf(gettext("messages","%d Matlab Toolbox(es) Functions, original calling sequence used :"),size2);
+ msprintf(gettext("%d Matlab Toolbox(es) Functions, original calling sequence used :"),size2);
mtlbtool_fun(:,1)+mtlbtool_fun(:,2);
"*";
- msprintf(gettext("messages","%d Unknown Function(s), original calling sequence used :"),size3);
+ msprintf(gettext("%d Unknown Function(s), original calling sequence used :"),size3);
not_mtlb_fun(:,1)+not_mtlb_fun(:,2);
"*"]
write(resume_logfile,margin+info_resume)
file("close",resume_logfile)
- mdelete(pathconvert(TMPDIR)+gettext("messages","resumelogfile.dat"))
+ mdelete(pathconvert(TMPDIR)+gettext("resumelogfile.dat"))
//end
- m2sci_info(gettext("messages","Macro to tree conversion: Done"),-1);
+ m2sci_info(gettext("Macro to tree conversion: Done"),-1);
crp(1)=""; // Delete function prototype
if isempty(firstline) then
// Output summary information
infos=[]
if m2sci_infos(1) then
- infos=gettext("messages","Translation may be improved: see the //! comments and for all mtlb_<funname> function call");
+ infos=gettext("Translation may be improved: see the //! comments and for all mtlb_<funname> function call");
end
if m2sci_infos(2) then
- infos=[infos;gettext("messages","Translation may be wrong (see the //!! comments).")]
+ infos=[infos;gettext("Translation may be wrong (see the //!! comments).")]
end
nametbl($)=[]
else
- infos=gettext("messages","File contains no instruction, no translation made...");
+ infos=gettext("File contains no instruction, no translation made...");
end
// End of translation messages
-mss=gettext("messages","****** End of mfile2sci() session ******");
+mss=gettext("****** End of mfile2sci() session ******");
m2sci_info([infos;mss],-1);
// For execution called by translatepaths()
//nametbl=resume(nametbl)
mdelete(pathconvert(TMPDIR)+fnam+ ".tree")
-mdelete(pathconvert(TMPDIR)+gettext("messages","m2sci_message_5"))
+mdelete(pathconvert(TMPDIR)+gettext("m2sci_message_5"))
endfunction
end
// If at least one operand is [] then Matlab result is [] but not Scilab one
elseif is_empty(A) | is_empty(B) then
- set_infos(msprintf(gettext("messages","At least one operand of %s is an empty matrix, Scilab equivalent is []."),expression2code(tree)),0)
+ set_infos(msprintf(gettext("At least one operand of %s is an empty matrix, Scilab equivalent is []."),expression2code(tree)),0)
tree=Cste([])
else
tree.out(1).dims=allunknown(A.dims)
tree.lhs(1).dims=list(dims(1:2))
tree.lhs(1).type=var.type
else
- error(gettext("errors","Extraction from strings with more than two indexes not implemented."))
+ error(gettext("Extraction from strings with more than two indexes not implemented."))
end
else
tree.out(1).dims=dims
[bval,index]=isdefinedvar(var)
if ~bval then
- error(msprintf(gettext("errors","M2SCI bug: extraction from unknown variable %s in varslist."),var.name))
+ error(msprintf(gettext("M2SCI bug: extraction from unknown variable %s in varslist."),var.name))
else
tmp=get_contents_infer(var,infertree);
tree.out(1).dims=tmp.dims
[bval,index]=isdefinedvar(var)
if ~bval then
- error(msprintf(gettext("errors","M2SCI bug: extraction from unknown variable %s in varslist."),var.name))
+ error(msprintf(gettext("M2SCI bug: extraction from unknown variable %s in varslist."),var.name))
else
tmp=get_contents_infer(var,list(infertree,Cste("entries")));
if is_a_scalar(tree.out(1)) then
[bval,index]=isdefinedvar(var)
if ~bval then
- error(msprintf(gettext("errors","M2SCI bug: extraction from unknown variable %s in varslist."),var.name))
+ error(msprintf(gettext("M2SCI bug: extraction from unknown variable %s in varslist."),var.name))
else
tmp=get_contents_infer(var,infertree);
tree.out(1).dims=tmp.dims
// this case should happen only if var(ind.value) contains only one value
[bval,index]=isdefinedvar(var)
if ~bval then
- error(msprintf(gettext("errors","M2SCI bug: extraction from unknown variable %s in varslist."),var.name))
+ error(msprintf(gettext("M2SCI bug: extraction from unknown variable %s in varslist."),var.name))
else
if varslist(index).vtype<>Struct then
// variable not defined as a struct, modify inference
tree=%i_st2sci(tree)
return
end
- error(msprintf(gettext("errors","recursive insertion in a variable which is not a Cell nor a Struct: %s."),to.name))
+ error(msprintf(gettext("recursive insertion in a variable which is not a Cell nor a Struct: %s."),to.name))
end
// Two indexes: to(ind1,ind2,...)=from or more
else
[bval,index]=isdefinedvar(to)
varslist(index).infer.type.vtype=Cell
else
- error(msprintf(gettext("errors","destination variable is not a cell: %s is of type %s."),to.name,string(to.vtype)))
+ error(msprintf(gettext("destination variable is not a cell: %s is of type %s."),to.name,string(to.vtype)))
end
elseif to.vtype==Unknown then
insert(Equal(list(to),Funcall("cell",1,list(),list(to))))
tree.out(1).contents.index($+1)=list(tree.operands(2),Cste("entries"))
tree.out(1).contents.data($+1)=from.contents.data(1)
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
else
tree.out(1).infer=from.infer
elseif lstsize(from.contents.index)==0 then
tree.out(1).contents=Contents()
else
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
end
endfunction
if is_empty(from) then // Clear element: A(p)=[]
// Nothing done
else // Change type of variable
- error(gettext("errors","Not yet implemented."))
+ error(gettext("Not yet implemented."))
end
end
end
tree.operands=list(A,B)
if is_empty(A) | is_empty(B) then
- set_infos(msprintf(gettext("messages","One operand is an empty matrix in : %s, result set to []."),expression2code(tree)),1);
+ set_infos(msprintf(gettext("One operand is an empty matrix in : %s, result set to []."),expression2code(tree)),1);
tree=Cste([])
tree.dims=list(1,0)
elseif not_empty(A) & not_empty(B) then
tree.operands=list(A,inc,B)
if is_empty(A) | is_empty(B) | is_empty(inc) then
- set_infos(msprintf(gettext("messages","One operand is an empty matrix in : %s, result set to []."),expression2code(tree)),1);
+ set_infos(msprintf(gettext("One operand is an empty matrix in : %s, result set to []."),expression2code(tree)),1);
tree=Cste([])
tree.dims=list(1,0)
elseif not_empty(A) & not_empty(B) & not_empty(inc) then
if is_empty(A) | is_empty(B) then
// For >, <, >= and <= : Scilab gives an error message if both operands are []
// For == and ~= : Scilab returns %T or %F
- set_infos(msprintf(gettext("messages","At least one operand is an empty matrix for operator: %s, result set to []."),expression2code(tree)),1);
+ set_infos(msprintf(gettext("At least one operand is an empty matrix for operator: %s, result set to []."),expression2code(tree)),1);
tree=Cste([])
elseif is_a_scalar(A) & not_empty(B) then
tree.out(1).dims=B.dims
end
// If at least one operand is [] then Matlab result is [] but not Scilab one
elseif is_empty(A) | is_empty(B) then
- set_infos(msprintf(gettext("messages","At least one operand of %s is an empty matrix, Scilab equivalent is []."),expression2code(tree)),0)
+ set_infos(msprintf(gettext("At least one operand of %s is an empty matrix, Scilab equivalent is []."),expression2code(tree)),0)
tree=Cste([])
else
tree.out(1).dims=allunknown(A.dims);
X=getrhs(tree)
//X=convert2double(X)
-set_infos(msprintf(gettext("messages","If %s is outside [-1,1]"),expression2code(X),expression2code(tree)),2)
+set_infos(msprintf(gettext("If %s is outside [-1,1]"),expression2code(X),expression2code(tree)),2)
tree.name="atanh"
Op=Operation("./",list(Cste(1),X),list())
A = Funcall("abs",1,Rhs(A),list(Variable("",A.infer)))
elseif ~is_real(A) then
newA = Funcall("abs",1,Rhs(A),list(Variable("",A.infer)))
- repl_poss(newA,A,A,gettext("messages","is Real."))
+ repl_poss(newA,A,A,gettext("is Real."))
A=newA
end
tree.rhs=Rhs(A)
A = Funcall("abs",1,Rhs(A),list(Variable("",A.infer)))
elseif ~is_real(A) then
newA = Funcall("abs",1,Rhs(A),list(Variable("",A.infer)))
- repl_poss(newA,A,A,gettext("messages","is Real."))
+ repl_poss(newA,A,A,gettext("is Real."))
A=newA
end
tree.rhs=Rhs(A,dim)
A = Funcall("abs",1,Rhs(A),list(Variable("",A.infer)))
elseif ~is_real(A) then
newA = Funcall("abs",1,Rhs(A),list(Variable("",A.infer)))
- repl_poss(newA,A,A,gettext("messages","is Real."))
+ repl_poss(newA,A,A,gettext("is Real."))
A=newA
end
tree.rhs=Rhs(A)
A = Funcall("abs",1,Rhs(A),list(Variable("",A.infer)))
elseif ~is_real(A) then
newA = Funcall("abs",1,Rhs(A),list(Variable("",A.infer)))
- repl_poss(newA,A,A,gettext("messages","is Real."))
+ repl_poss(newA,A,A,gettext("is Real."))
A=newA
end
tree.rhs=Rhs(A,dim)
A=convert2double(A)
tree.rhs=Rhs(A)
-set_infos(msprintf(gettext("messages","If %s is outside [-1,1]"),expression2code(A),expression2code(tree)),2)
+set_infos(msprintf(gettext("If %s is outside [-1,1]"),expression2code(A),expression2code(tree)),2)
tree.lhs(1).dims=A.dims
tree.lhs(1).type=Type(Double,Unknown)
A=convert2double(A)
tree.rhs=Rhs(A)
-set_infos(msprintf(gettext("messages","If %s is outside [-1,1]"),expression2code(A),expression2code(tree)),2)
+set_infos(msprintf(gettext("If %s is outside [-1,1]"),expression2code(A),expression2code(tree)),2)
tree.lhs(1).dims=A.dims
tree.lhs(1).type=Type(Double,Unknown)
// axis square
elseif tree.rhs(krhs).value=="square" then
- set_infos(gettext("messages","cube_scaling only used in 3d mode."),2);
+ set_infos(gettext("cube_scaling only used in 3d mode."),2);
tree=Funcall("set",1,Rhs(a,"cube_scaling","on"),tree.lhs)
// axis vis3d
// F.B
if size(tree.lhs)==2 then // [y,ierr]=besseli(alpha,x)
- error(gettext("errors","Bessel function is not implemented for 2 outputs arguments."))
+ error(gettext("Bessel function is not implemented for 2 outputs arguments."))
end
if rhs==2 then
// F.B
if size(tree.lhs)==2 then // [y,ierr]=besselj(alpha,x)
- error(gettext("errors","Bessel function is not implemented for 2 outputs arguments."))
+ error(gettext("Bessel function is not implemented for 2 outputs arguments."))
end
if rhs==2 then
// F.B
if size(tree.lhs)==2 then // [y,ierr]=besselk(alpha,x)
- error(gettext("errors","Bessel function is not implemented for 2 outputs arguments."))
+ error(gettext("Bessel function is not implemented for 2 outputs arguments."))
end
if rhs==2 then
// F.B
if size(tree.lhs)==2 then // [y,ierr]=bessely(alpha,x)
- error(gettext("errors","Bessel function is not implemented for 2 outputs arguments."))
+ error(gettext("Bessel function is not implemented for 2 outputs arguments."))
end
if rhs==2 then
insert(Equal(list(n),A))
B=Operation("ext",list(n,Cste(1)),list())
repl_poss(B,..
- A,A,gettext("messages","is a scalar."))
+ A,A,gettext("is a scalar."))
elseif ~is_a_scalar(A) then
B=Operation("ext",list(A,Cste(1)),list())
repl_poss(B,..
- A,A,gettext("messages","is a scalar."))
+ A,A,gettext("is a scalar."))
else
B=A
end
n=Funcall("real",1,list(n),list(Variable("",n.infer)))
elseif ~is_real(n) then
newn=Funcall("real",1,list(n),list(Variable("",n.infer)))
- repl_poss(newn,n,n,gettext("messages","is Real."));
+ repl_poss(newn,n,n,gettext("is Real."));
n=newn
end
if is_a_scalar(n) then
tree.rhs(k)=Funcall("real",1,list(tree.rhs(k)),list())
elseif ~is_real(tree.rhs(k)) then
newn=Funcall("real",1,list(tree.rhs(k)),list())
- repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("messages","is Real."));
+ repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("is Real."));
tree.rhs(k)=newn
end
end
elseif A.vtype==Unknown then
tree.lhs(1).dims=list(-1,-1);
else
- error(msprintf(gettext("errors","%s is not implemented."),string(A.vtype)))
+ error(msprintf(gettext("%s is not implemented."),string(A.vtype)))
end
elseif rhs>1 //char(t1,t2,t3,...)
lhs_dims1=0;
tree.lhs(1).type=X.type
// [R,p] = chol(X)
else
- no_equiv(gettext("messages","Call to chol() with 2 outputs."))
+ no_equiv(gettext("Call to chol() with 2 outputs."))
end
endfunction
// V.C.
if rhs<1 then
- set_infos(gettext("messages","All children will be deleted, no HandleVisibility property in Scilab graphics."),2);
+ set_infos(gettext("All children will be deleted, no HandleVisibility property in Scilab graphics."),2);
end
// a=gca()
// V.C.
if rhs<1 then
- set_infos(gettext("messages","All children will be deleted, no HandleVisibility property in Scilab graphics."),2);
+ set_infos(gettext("All children will be deleted, no HandleVisibility property in Scilab graphics."),2);
end
if rhs==1 then
- set_infos(gettext("messages","All properties will be reset."),2);
+ set_infos(gettext("All properties will be reset."),2);
end
// f=gcf() inserted if output value stored in a variable
global %graphicswindow
if tree.lhs(1).name<>"ans" then
- no_equiv(msprintf(gettext("messages","%s will be ignored at run time."),tree.lhs(1).name))
+ no_equiv(msprintf(gettext("%s will be ignored at run time."),tree.lhs(1).name))
end
// close
tree.name="mtlb_close"
end
else // close('all','hidden')
- set_infos(gettext("messages","All windows will be deleted."),2);
+ set_infos(gettext("All windows will be deleted."),2);
tree.name="xdel"
tree.rhs(1)=Funcall("winsid",1,list(),list())
tree.rhs(2)=null()
A.out=tree.lhs
end
tree=A;
- set_infos(msprintf(gettext("messages","Scilab %s() does not work when dim input argument is greater than number of dims of first rhs..."),"cumprod"),1)
+ set_infos(msprintf(gettext("Scilab %s() does not work when dim input argument is greater than number of dims of first rhs..."),"cumprod"),1)
return
end
end
A.out=tree.lhs
end
tree=A;
- set_infos(msprintf(gettext("messages","Scilab %s() does not work when dim input argument is greater than number of dims of first rhs..."),"cumsum"),1)
+ set_infos(msprintf(gettext("Scilab %s() does not work when dim input argument is greater than number of dims of first rhs..."),"cumsum"),1)
return
end
end
if ~is_real(D) then
newD=Funcall("real",1,list(D),list(D))
- repl_poss(newD,D,D,gettext("messages","is Real."));
+ repl_poss(newD,D,D,gettext("is Real."));
D=newD
end
tree.rhs=list(D)
// Ouput: tree = Scilab equivalent for tree
// V.C.
-set_infos(gettext("messages","Verify that overloading functions have been written for inputs in display()."),2);
+set_infos(gettext("Verify that overloading functions have been written for inputs in display()."),2);
tree.name="disp"
endfunction
// Ouput: tree = Scilab equivalent for tree
// V.C.
-set_infos(gettext("messages","Drawing events are not queued in Scilab."),0);
+set_infos(gettext("Drawing events are not queued in Scilab."),0);
tree=Funcall("%comment",1,list(Cste(tree.name)),list())
endfunction
tree.lhs(1).type=Type(Double,Unknown)
// [V,D] = eig(A)
else
- set_infos(msprintf(gettext("messages","mtlb_eig() called because Scilab and Matlab value do not always match for %s."),tree.lhs(1).name),0)
+ set_infos(msprintf(gettext("mtlb_eig() called because Scilab and Matlab value do not always match for %s."),tree.lhs(1).name),0)
tree.name="mtlb_eig"
tree.lhs(1).dims=list(A.dims(1),A.dims(1))
tree.lhs(1).type=Type(Double,Unknown)
// 'nobalance'
if B.vtype==String then
- no_equiv(gettext("messages","''nobalance'' option, IGNORED."))
+ no_equiv(gettext("''nobalance'' option, IGNORED."))
tree.rhs=Rhs(tree.rhs(1))
if lhs==1 then
tree.name="spec"
end
if B.vtype<>Double then
- set_infos(gettext("messages","eig() with 2 inputs: consider generalized eigen. Check."),2)
+ set_infos(gettext("eig() with 2 inputs: consider generalized eigen. Check."),2)
end
m=A.dims(1)
n=A.dims(2)
end
// eig(A,B,flag)
else
- no_equiv(msprintf(gettext("messages","%s, flag IGNORED."),expression2code(tree)))
+ no_equiv(msprintf(gettext("%s, flag IGNORED."),expression2code(tree)))
tree.rhs(3)=null()
// Emulation function: mtlb_exist()
// V.C.
-no_equiv(gettext("messages","Matlab exist(), mtlb_exist() is called."))
+no_equiv(gettext("Matlab exist(), mtlb_exist() is called."))
-set_infos(gettext("messages","mtlb_exist() is just a partial emulation of Matlab exist() function."),2)
+set_infos(gettext("mtlb_exist() is just a partial emulation of Matlab exist() function."),2)
scitree.name="mtlb_exist"
n=Funcall("real",1,list(n),list(Variable("",n.infer)))
elseif ~is_real(n) then
newn=Funcall("real",1,list(n),list(Variable("",n.infer)))
- repl_poss(newn,n,n,gettext("messages","is Real."));
+ repl_poss(newn,n,n,gettext("is Real."));
n=newn
end
if is_a_scalar(n) then
tree.rhs(k)=Funcall("real",1,list(tree.rhs(k)),list())
elseif ~is_real(tree.rhs(k)) then
newn=Funcall("real",1,list(tree.rhs(k)),list())
- repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("messages","is Real."));
+ repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("is Real."));
tree.rhs(k)=newn
end
end
n=Funcall("real",1,list(n),list(Variable("",n.infer)))
elseif ~is_real(n) then
newn=Funcall("real",1,list(n),list(Variable("",n.infer)))
- repl_poss(newn,n,n,gettext("messages","is Real."));
+ repl_poss(newn,n,n,gettext("is Real."));
n=newn
end
if is_a_scalar(n) then
tree.rhs(k)=Funcall("real",1,list(tree.rhs(k)),list())
elseif ~is_real(tree.rhs(k)) then
newn=Funcall("real",1,list(tree.rhs(k)),list())
- repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("messages","is Real."));
+ repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("is Real."));
tree.rhs(k)=newn
end
end
tree.name="mclose"
if fid.vtype==Unknown then
- set_infos(gettext("messages","Unknown type for input parameter: consider fclose(fid)."),2)
+ set_infos(gettext("Unknown type for input parameter: consider fclose(fid)."),2)
end
tree.lhs(1).dims=list(1,1)
if rhs==2 then
tree.rhs(2)=null()
if lhs==2 then
- no_equiv(msprintf(gettext("messages","%s with two outputs."),expression2code(tree)));
+ no_equiv(msprintf(gettext("%s with two outputs."),expression2code(tree)));
else
tree.name="mclearerr"
tree.lhs(1).dims=list(1,Unknown)
// ferror(fid)
else
if lhs==2 then
- no_equiv(msprintf(gettext("messages","%s with two outputs."),expression2code(tree)));
+ no_equiv(msprintf(gettext("%s with two outputs."),expression2code(tree)));
else
tree.name="merror"
tree.lhs(1).dims=list(1,1)
// Emulation function: mtlb_feval()
// V.C.
-set_infos(gettext("messages","Verify that expression evaluated by execstr() is Scilab compatible."),2)
+set_infos(gettext("Verify that expression evaluated by execstr() is Scilab compatible."),2)
RHS="("
for k=2:rhs
x = Funcall("abs",1,list(x),list(Variable("",x.infer)))
elseif ~is_real(x) then
newx = Funcall("abs",1,list(x),list(Variable("",x.infer)))
- repl_poss(newx,x,x,gettext("messages","is Real."));
+ repl_poss(newx,x,x,gettext("is Real."));
x=newx
end
tree.rhs=Rhs(x)
x = Funcall("abs",1,list(x),list(Variable("",x.infer)))
elseif ~is_real(x) then
newx = Funcall("abs",1,list(x),list(Variable("",x.infer)))
- repl_poss(newx,x,x,gettext("messages","is Real."));
+ repl_poss(newx,x,x,gettext("is Real."));
x=newx
end
tree.rhs=Rhs(x)
// Emulation function: mtlb_findstr()
// V.C.
-set_infos(gettext("messages","No equivalent for findstr() in Scilab so mtlb_findstr() is called."),0);
+set_infos(gettext("No equivalent for findstr() in Scilab so mtlb_findstr() is called."),0);
tree.name="mtlb_findstr"
if typeof(filename)=="cste" then
if filename.value=="all" then
- no_equiv(gettext("messages","fopen(''all'') has no translation."))
+ no_equiv(gettext("fopen(''all'') has no translation."))
return
end
elseif filename.vtype==Double then
- no_equiv(msprintf(gettext("messages","%s (See fileinfo() function)."),expression2code(tree)))
+ no_equiv(msprintf(gettext("%s (See fileinfo() function)."),expression2code(tree)))
return
end
// Options 'W' and 'A' are unknown for Scilab
if typeof(permission)=="cste" then
if or(permission.value==["W","A"]) then
- no_equiv(gettext("messages","W and A permission parameters."));
+ no_equiv(gettext("W and A permission parameters."));
return
end
end
tree.lhs(2).type=Type(String,Real)
// [fid,mess,machineformat]=fopen(filename) and so on
else
- no_equiv(gettext("messages","fopen used with three outputs."))
+ no_equiv(gettext("fopen used with three outputs."))
end
endfunction
// Emulation function: mtlb_fprintf()
// V.C.
-set_infos(msprintf(gettext("messages","No simple equivalent, so %s() is called."),"mtlb_fprintf"),0);
+set_infos(msprintf(gettext("No simple equivalent, so %s() is called."),"mtlb_fprintf"),0);
tree.name="mtlb_fprintf"
RHS=[]
-set_infos(msprintf(gettext("messages","No simple equivalent, so %s() is called."),"mtlb_fread"),0);
+set_infos(msprintf(gettext("No simple equivalent, so %s() is called."),"mtlb_fread"),0);
if rhs==4 then
- no_equiv(msprintf(gettext("messages","%s() called with skip parameter."),"fread"));
+ no_equiv(msprintf(gettext("%s() called with skip parameter."),"fread"));
end
tree.name="mtlb_fread"
RHS=[]
-set_infos(msprintf(gettext("messages","No simple equivalent, so %s() is called."),"mtlb_fscanf"),0);
+set_infos(msprintf(gettext("No simple equivalent, so %s() is called."),"mtlb_fscanf"),0);
tree.name="mtlb_fscanf"
case 1 then
flag="end"
else
- set_infos(msprintf(gettext("messages","Not enough information on %s to set the proper flag."),expression2code(origin)),1)
+ set_infos(msprintf(gettext("Not enough information on %s to set the proper flag."),expression2code(origin)),1)
flag=Funcall("fseek_origin",1,list(origin),list())
end
else
end
end
else
- set_infos(msprintf(gettext("messages","Not enough information on %s to set the proper flag."),expression2code(origin)),1)
+ set_infos(msprintf(gettext("Not enough information on %s to set the proper flag."),expression2code(origin)),1)
flag=Funcall("fseek_origin",1,list(origin),list())
end
end
// Emulation function: mtlb_fwrite()
// V.C.
-set_infos(msprintf(gettext("messages","OFF"),"mtlb_fwrite"),0);
+set_infos(msprintf(gettext("OFF"),"mtlb_fwrite"),0);
if rhs==4 then
- no_equiv(msprintf(gettext("messages","%s() called with skip parameter."),"fwrite"));
+ no_equiv(msprintf(gettext("%s() called with skip parameter."),"fwrite"));
end
tree.name="mtlb_fwrite"
end
if exist==%F then
varslist($+1)=M2scivar(nam,nam,Infer(list(Unknown,Unknown),Type(Unknown,Unknown)))
- write(%io(2),msprintf(gettext("messages","Global variable %s added to M2SCI variable list."),nam))
+ write(%io(2),msprintf(gettext("Global variable %s added to M2SCI variable list."),nam))
end
end
end
tree.name="set";
tree.rhs=Rhs(ax,"grid",off);
else
- set_infos(gettext("messages","No minor grid in Scilab."),2);
+ set_infos(gettext("No minor grid in Scilab."),2);
tree.name="mtlb_grid";
end
else
insert(Equal(list(Operation("ins",list(ax,Cste("grid")),list())),off))
tree=list()
else
- set_infos(gettext("messages","No minor grid in Scilab."),2);
+ set_infos(gettext("No minor grid in Scilab."),2);
tree.name="mtlb_grid";
end
else
tree.name="set"
tree.rhs=Rhs(gca_funcall,Cste("auto_clear"),Cste("on"))
else
- no_equivalent(msprintf(gettext("messages","%s option."),opt.value))
+ no_equivalent(msprintf(gettext("%s option."),opt.value))
end
else
tree.name="mtlb_hold"
tree.rhs=Rhs(x)
if is_complex(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"int16","int16"),2);
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"int16","int16"),2);
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
end
tree=x
elseif ~is_real(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"int16","int16"),2);
- repl_poss(x,tree,x,gettext("messages","is Real."))
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"int16","int16"),2);
+ repl_poss(x,tree,x,gettext("is Real."))
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
tree.rhs=Rhs(x)
if is_complex(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"int32","int32"),2);
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"int32","int32"),2);
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
end
tree=x
elseif ~is_real(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"int32","int32"),2);
- repl_poss(x,tree,x,gettext("messages","is Real."))
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"int32","int32"),2);
+ repl_poss(x,tree,x,gettext("is Real."))
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
tree.rhs=Rhs(x)
if is_complex(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"int8","int8"),2);
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"int8","int8"),2);
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
end
tree=x
elseif ~is_real(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"int8","int8"),2);
- repl_poss(x,tree,x,gettext("messages","is Real."))
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"int8","int8"),2);
+ repl_poss(x,tree,x,gettext("is Real."))
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
case "lti"
tree=Operation("==",list(typeoftree,Cste("state-space")),tree.lhs)
else
- set_infos(msprintf(gettext("messages","Unhandled class: %s."),class.value),2)
+ set_infos(msprintf(gettext("Unhandled class: %s."),class.value),2)
tree.lhs(1).dims=list(1,1)
tree.lhs(1).type=Type(Boolean,Real)
return
// V.C.
if tree.rhs(1).vtype==Struct then
- set_infos(gettext("messages","isequal requires fields are in the same order for structs to be equal."),2);
+ set_infos(gettext("isequal requires fields are in the same order for structs to be equal."),2);
end
tree.lhs(1).dims=list(1,1)
for k=1:rhs
if typeof(tree.rhs(k))=="cste" & tree.rhs(k).value=="-regexp" then
- set_infos(gettext("messages","Option -regexp not yet handled: will be ignored."),2);
+ set_infos(gettext("Option -regexp not yet handled: will be ignored."),2);
end
if typeof(tree.rhs(k))=="cste" //& exists("sci_"+tree.rhs(k).value)==1
INFER=Infer()
X = Funcall("real",1,list(X),list(Variable("",X.infer)))
elseif ~is_real(X) then
newX = Funcall("real",1,list(X),list(Variable("",X.infer)))
- repl_poss(newX,X,X,gettext("messages","is Real."));
+ repl_poss(newX,X,X,gettext("is Real."));
X=newX
end
tree.rhs=Rhs(X)
end
if is_empty(X) then
- set_infos(msprintf(gettext("messages","%s is an empty matrix, so result is set to []."),expression2code(X)),0);
+ set_infos(msprintf(gettext("%s is an empty matrix, so result is set to []."),expression2code(X)),0);
tree=Cste([])
elseif not_empty(X) then
if X.vtype==Boolean then
tree.lhs(1).type=Type(Double,Unknown)
if size(tree.lhs)==2
tree.lhs(2)=null()
- set_infos(gettext("messages","second output argument will be ignored."),2);
+ set_infos(gettext("second output argument will be ignored."),2);
end
endfunction
// V.C.
if rhs==2 then
- no_equiv(gettext("messages","-all option ignored."))
+ no_equiv(gettext("-all option ignored."))
tree.rhs(2)=null()
end
end
if lhs==3 then
- no_equiv(msprintf(gettext("messages","%s when called with three outputs."),expression2code(tree)));
+ no_equiv(msprintf(gettext("%s when called with three outputs."),expression2code(tree)));
end
endfunction
else
fieldnb=2
end
- set_infos(msprintf(gettext("messages","%s considered to be a Scilab macro."),rhs2code(tree.rhs)),2);
+ set_infos(msprintf(gettext("%s considered to be a Scilab macro."),rhs2code(tree.rhs)),2);
evstrtree=Funcall("evstr",1,tree.rhs,list())
macrovartree=Funcall("macrovar",1,Rhs(evstrtree),list())
getfieldtree=Funcall("getfield",1,Rhs(fieldnb,macrovartree),list())
else
fieldnb=2
end
- set_infos(msprintf(gettext("messages","%s considered to be a Scilab macro."),rhs2code(tree.rhs)),2);
+ set_infos(msprintf(gettext("%s considered to be a Scilab macro."),rhs2code(tree.rhs)),2);
evstrtree=Funcall("evstr",1,tree.rhs,list())
macrovartree=Funcall("macrovar",1,Rhs(evstrtree),list())
getfieldtree=Funcall("getfield",1,Rhs(fieldnb,macrovartree),list())
// V.C.
if rhs==1 then
- set_infos(gettext("messages","string output can be different from Matlab num2str output."),2)
+ set_infos(gettext("string output can be different from Matlab num2str output."),2)
tree.name="string"
else
if tree.rhs(2).vtype==String then
tree.rhs=Rhs(tree.rhs(2),tree.rhs(1))
elseif tree.rhs(2).vtype<>Unknown then
no_equiv(expression2code(tree))
- set_infos(gettext("messages","See msprintf for solutions."),1);
+ set_infos(gettext("See msprintf for solutions."),1);
else
tree.name="mtlb_num2str"
end
n=Funcall("real",1,list(n),list(Variable("",n.infer)))
elseif ~is_real(n) then
newn=Funcall("real",1,list(n),list(Variable("",n.infer)))
- repl_poss(newn,n,n,gettext("messages","is Real."));
+ repl_poss(newn,n,n,gettext("is Real."));
n=newn
end
if is_a_scalar(n) then
tree.rhs(k)=Funcall("real",1,list(tree.rhs(k)),list())
elseif ~is_real(tree.rhs(k)) then
newn=Funcall("real",1,list(tree.rhs(k)),list())
- repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("messages","is Real."));
+ repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("is Real."));
tree.rhs(k)=newn
end
end
E = Funcall("real",1,list(E),list(Variable("",E.infer)))
elseif ~is_real(E) then
newE = Funcall("real",1,list(E),list(Variable("",E.infer)))
- repl_poss(newE,E,E,gettext("messages","is Real."));
+ repl_poss(newE,E,E,gettext("is Real."));
E=newE
end
if is_complex(F) then
F = Funcall("real",1,list(F),list(Variable("",F.infer)))
elseif ~is_real(F) then
newF = Funcall("real",1,list(F),list(Variable("",F.infer)))
- repl_poss(newF,F,F,gettext("messages","is Real."));
+ repl_poss(newF,F,F,gettext("is Real."));
F=newF
end
tree.lhs(2).type=Type(A.vtype,prop)
// [Q,R,E] = qr(A,0)
else
- set_infos(gettext("messages","Scilab and Matlab qr() do not give same results for this case: mtlb_qr() is used."),0)
+ set_infos(gettext("Scilab and Matlab qr() do not give same results for this case: mtlb_qr() is used."),0)
tree.name="mtlb_qr"
tree.lhs(1).dims=list(Unknown,Unknown)
tree.lhs(1).type=Type(A.vtype,prop)
n=Funcall("real",1,list(n),list(Variable("",n.infer)))
elseif ~is_real(n) then
newn=Funcall("real",1,list(n),list(Variable("",n.infer)))
- repl_poss(newn,n,n,gettext("messages","is Real."));
+ repl_poss(newn,n,n,gettext("is Real."));
n=newn
end
if is_a_scalar(n) then
tree.rhs(k)=Funcall("real",1,list(tree.rhs(k)),list())
elseif ~is_real(tree.rhs(k)) then
newn=Funcall("real",1,list(tree.rhs(k)),list())
- repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("messages","is Real."));
+ repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("is Real."));
tree.rhs(k)=newn
end
end
n=Funcall("real",1,list(n),list(Variable("",n.infer)))
elseif ~is_real(n) then
newn=Funcall("real",1,list(n),list(Variable("",n.infer)))
- repl_poss(newn,n,n,gettext("messages","is Real."));
+ repl_poss(newn,n,n,gettext("is Real."));
n=newn
end
if is_a_scalar(n) then
tree.rhs(k)=Funcall("real",1,list(tree.rhs(k)),list())
elseif ~is_real(tree.rhs(k)) then
newn=Funcall("real",1,list(tree.rhs(k)),list())
- repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("messages","is Real."));
+ repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("is Real."));
tree.rhs(k)=newn
end
end
m=Funcall("real",1,list(m),list(Variable("",m.infer)))
elseif ~is_real(m) then
newm=Funcall("real",1,list(m),list(Variable("",m.infer)))
- repl_poss(newm,m,m,gettext("messages","is Real."));
+ repl_poss(newm,m,m,gettext("is Real."));
m=newm
end
vtype=A.vtype
m=Funcall("real",1,list(m),list(Variable("",m.infer)))
elseif ~is_real(m) then
newm=Funcall("real",1,list(m),list(Variable("",m.infer)))
- repl_poss(newm,m,m,gettext("messages","is Real."));
+ repl_poss(newm,m,m,gettext("is Real."));
m=newm
end
if is_complex(n) then
n=Funcall("real",1,list(n),list(Variable("",n.infer)))
elseif ~is_real(n) then
newn=Funcall("real",1,list(n),list(Variable("",n.infer)))
- repl_poss(newn,n,n,gettext("messages","is Real."));
+ repl_poss(newn,n,n,gettext("is Real."));
n=newn
end
vtype=A.vtype
elseif tree.rhs(k).vtype==Unknown then
scitree=tree
scitree.rhs(k)=Funcall("mtlb_double",1,list(tree.rhs(k)),list(Variable("",tree.rhs(k).infer)))
- repl_poss(scitree,tree,tree.rhs(k),gettext("messages","is not a character string matrix."))
+ repl_poss(scitree,tree,tree.rhs(k),gettext("is not a character string matrix."))
tree=scitree
end
end
end
end
-set_infos(gettext("messages","WARNING: Matlab reshape() suppresses singleton higher dimension, it is not the case for matrix."),2)
+set_infos(gettext("WARNING: Matlab reshape() suppresses singleton higher dimension, it is not the case for matrix."),2)
tree.name="matrix"
tree.lhs(1).type=tree.rhs(1).type
if knowndims==%t
for k=1:rhs
if typeof(tree.rhs(k))=="cste" & tree.rhs(k).value=="-regexp" then
- set_infos(gettext("messages","Option -regexp not yet handled: will be ignored."),2);
+ set_infos(gettext("Option -regexp not yet handled: will be ignored."),2);
elseif typeof(tree.rhs(k))=="cste" & tree.rhs(k).value=="-append" then
- set_infos(gettext("messages","Option -append not yet handled: will be ignored."),2);
+ set_infos(gettext("Option -append not yet handled: will be ignored."),2);
end
end
X = getrhs(tree)
if X.vtype==String then
- set_infos(msprintf(gettext("messages","In %s %s is a String,"),expression2code(tree),expression2code(X),expression2code(X)),0)
+ set_infos(msprintf(gettext("In %s %s is a String,"),expression2code(tree),expression2code(X),expression2code(X)),0)
// Because of String concatenation
if typeof(X)=="operation" then
X.out(1)=tree.lhs(1)
// Matlab can work with dim > size(size(X),2) but not Scilab
if typeof(dim)=="cste" then
if dim.value>size(X.dims) then
- set_infos(msprintf(gettext("messages","M2SCI found: %s > size(size(%s),2),"),expression2code(dim),expression2code(X)),0)
+ set_infos(msprintf(gettext("M2SCI found: %s > size(size(%s),2),"),expression2code(dim),expression2code(X)),0)
tree=Cste(1)
else
tree.lhs(1).dims=list(1,1)
tree.lhs(1).type=A.type
if size(A.dims)>2 then
- set_infos(gettext("messages","Scilab sort() and gsort() do not work with multidimensional arrays"))
+ set_infos(gettext("Scilab sort() and gsort() do not work with multidimensional arrays"))
else
name="gsort"
if typeof(dim)=="cste" then
tree.lhs(1).type=A.type
if size(A.dims)>2 then
- set_infos(gettext("messages","Scilab sort() and gsort() do not work with multidimensional arrays"))
+ set_infos(gettext("Scilab sort() and gsort() do not work with multidimensional arrays"))
else
name="gsort"
if typeof(dim)=="cste" then
// nzmax does not exist in Scilab
if rhs==6 then
rhs=5
- set_infos(gettext("messages","Call to sparse(): nzmax option ignored."),0)
+ set_infos(gettext("Call to sparse(): nzmax option ignored."),0)
end
// S = sparse(A)
// Matlab tolerates length(i)<>length(j)...
if size(i.dims)<>size(j.dims) | size(i.dims)<>size(s.dims) then
- set_infos(gettext("messages","For Scilab sparse(), input values must have the same size, not sure they have."),2)
+ set_infos(gettext("For Scilab sparse(), input values must have the same size, not sure they have."),2)
end
if i.dims(2)==1 & j.dims(2)==1 then
k = Funcall("real",1,list(k),list(Variable("",k.infer)))
elseif ~is_real(k) then
newk = Funcall("real",1,list(k),list(Variable("",k.infer)))
- repl_poss(newk,k,k,gettext("messages","is Real."));
+ repl_poss(newk,k,k,gettext("is Real."));
k=newk
end
tree.rhs=Rhs(X,k)
k = Funcall("real",1,list(k),list(Variable("",k.infer)))
elseif ~is_real(k) then
newk = Funcall("real",1,list(k),list(Variable("",k.infer)))
- repl_poss(newk,k,k,gettext("messages","is Real."));
+ repl_poss(newk,k,k,gettext("is Real."));
k=newk
end
tree.rhs=Rhs(X,k)
n=Funcall("real",1,list(n),list(Variable("",n.infer)))
elseif ~is_real(n) then
newn=Funcall("real",1,list(n),list(Variable("",n.infer)))
- repl_poss(newn,n,n,gettext("messages","is Real."));
+ repl_poss(newn,n,n,gettext("is Real."));
n=newn
end
if is_a_scalar(n) then
tree.rhs(k)=Funcall("real",1,list(tree.rhs(k)),list())
elseif ~is_real(tree.rhs(k)) then
newn=Funcall("real",1,list(tree.rhs(k)),list())
- repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("messages","is Real."));
+ repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("is Real."));
tree.rhs(k)=newn
end
end
// Emulation function: mtlb_type()
// V.C.
-set_infos(msprintf(gettext("messages","No simple equivalent, so %s() is called."),"mtlb_type"),0);
+set_infos(msprintf(gettext("No simple equivalent, so %s() is called."),"mtlb_type"),0);
tree.name="mtlb_type"
endfunction
tree.rhs=Rhs(x)
if is_complex(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint16","uint16"),2);
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint16","uint16"),2);
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
end
tree=x
elseif ~is_real(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint16","uint16"),2);
- repl_poss(x,tree,x,gettext("messages","is Real."))
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint16","uint16"),2);
+ repl_poss(x,tree,x,gettext("is Real."))
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
tree.rhs=Rhs(x)
if is_complex(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint32","uint32"),2);
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint32","uint32"),2);
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
end
tree=x
elseif ~is_real(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint32","uint32"),2);
- repl_poss(x,tree,x,gettext("messages","is Real."))
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint32","uint32"),2);
+ repl_poss(x,tree,x,gettext("is Real."))
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
tree.rhs=Rhs(x)
if is_complex(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint8","uint8"),2);
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint8","uint8"),2);
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
end
tree=x
elseif ~is_real(x) then
- set_infos(msprintf(gettext("messages","Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint8","uint8"),2);
- repl_poss(x,tree,x,gettext("messages","is Real."))
+ set_infos(msprintf(gettext("Scilab %s() does not work with Complex values: %s() call IGNORED."),"uint8","uint8"),2);
+ repl_poss(x,tree,x,gettext("is Real."))
if typeof(x)=="operation" then
x.out=tree.lhs
elseif typeof(x)=="funcall" then
elseif rhs<=2 then
if rhs==2 then
// First arg is a msg_id
- set_infos(gettext("messages","message_id ignored in following line."),2)
+ set_infos(gettext("message_id ignored in following line."),2)
tree.rhs(1)=Cste(tree.rhs(1).value+" "+tree.rhs(2).value)
tree.rhs(2)=null()
end
if typeof(tree.rhs(1))=="cste" & or(convstr(tree.rhs(1).value)==["""on""","""off""","""backtrace""","""debug""","""once""","""always"""]) then
if tree.lhs(1).name<>"ans" then
- no_equiv(msprintf(gettext("messages","%s: Output value set to ''on''."),expression2code(tree)))
+ no_equiv(msprintf(gettext("%s: Output value set to ''on''."),expression2code(tree)))
tree=Cste("on")
else
no_equiv(expression2code(tree))
n=Funcall("real",1,list(n),list(Variable("",n.infer)))
elseif ~is_real(n) then
newn=Funcall("real",1,list(n),list(Variable("",n.infer)))
- repl_poss(newn,n,n,gettext("messages","is Real."));
+ repl_poss(newn,n,n,gettext("is Real."));
n=newn
end
if is_a_scalar(n) then
tree.rhs(k)=Funcall("real",1,list(tree.rhs(k)),list())
elseif ~is_real(tree.rhs(k)) then
newn=Funcall("real",1,list(tree.rhs(k)),list())
- repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("messages","is Real."));
+ repl_poss(newn,tree.rhs(k),tree.rhs(k),gettext("is Real."));
tree.rhs(k)=newn
end
end
// Create a logfile and a whatis file
Paths=stripblanks(Paths)
-[tempfd,ierr]=file('open',pathconvert(TMPDIR)+gettext("messages","unitfile.dat"),"old");
+[tempfd,ierr]=file('open',pathconvert(TMPDIR)+gettext("unitfile.dat"),"old");
if ierr==0 then
- load(pathconvert(TMPDIR)+gettext("messages","unitfile.dat"))
+ load(pathconvert(TMPDIR)+gettext("unitfile.dat"))
file('close',whsfil_unit);
file('close',tempfd);
- mdelete(pathconvert(TMPDIR)+gettext("messages","unitfile.dat"))
+ mdelete(pathconvert(TMPDIR)+gettext("unitfile.dat"))
end
whsfil_unit=file('open',res_path+'whatis','unknown')
-save(pathconvert(TMPDIR)+gettext("messages","unitfile.dat"),whsfil_unit)
+save(pathconvert(TMPDIR)+gettext("unitfile.dat"),whsfil_unit)
// Close paths with a / or a \
for k=1:size(Paths,'*')
if part(Paths(k),length(Paths(k)))<>sep then
for k1=1:size(mfiles,1)
mpath=mfiles(k1)
- disp(gettext("messages","********************lst_funcall**********************"))
+ disp(gettext("********************lst_funcall**********************"))
disp(mpath)
filefuncallname($+1)=lst_funcall(mpath,fnamvect)
end
// File closing
file('close',whsfil_unit);
-mdelete(pathconvert(TMPDIR)+gettext("messages","unitfile.dat"))
+mdelete(pathconvert(TMPDIR)+gettext("unitfile.dat"))
// create builder.sce and loader.sce files
// get the directory name where the Scilab functions are written
[str,n,line,func]=lasterror(clearerror)
if n>0 then
if func=="" then
- answ=gettext('messages','the last error did not occur inside a library function.');
+ answ=gettext('the last error did not occur inside a library function.');
else
p=get_function_path(func);
if p<>[] then
scipad(p);
TCL_EvalStr("blinkline "+string(line)+" "+func,"scipad");
- answ=gettext('messages','opening file ')+p+gettext('messages',' on line ')+string(line)+gettext('messages','the source file of the function ')+func;
+ answ=gettext('opening file ')+p+gettext(' on line ')+string(line)+gettext('the source file of the function ')+func;
else
- answ=gettext('messages','the source file of the function ')+func+ ..
- gettext('messages',' was not found in any library path');
+ answ=gettext('the source file of the function ')+func+ ..
+ gettext(' was not found in any library path');
end
end
else
- answ=gettext('messages',' was not found in any library path');
+ answ=gettext(' was not found in any library path');
end
endfunction
[lhs,rhs]=argn(0)
if rhs<>0 then error(39), end // (??)
if (~%tk)
- write(%io(2),[gettext('messages','Editor works only with Tcl/Tk.');],"(a)")
+ write(%io(2),[gettext('Editor works only with Tcl/Tk.');],"(a)")
return
else
scipad()
noguimode=find(sciargs()=="-nogui");
if (nwnimode <>[] | noguimode <>[]) then
clear nwnimode noguimode
- warning(gettext('messages',' Scilab in no window no interactive mode : Scipad unavailable.'));
+ warning(gettext(' Scilab in no window no interactive mode : Scipad unavailable.'));
abort;
end;
clear nwnimode noguimode
// //the correspondance between function and file name it is tacitly assumed
// filetoopen=pathconvert(libpath+funname+".sci",%f)
// else
-// warning(gettext('messages','Function ')+funname+gettext('messages','is not contained in a loaded library, ') ..
-// +gettext('messages','Scipad doesn't know where to find its source'))
+// warning(gettext('Function ')+funname+gettext('is not contained in a loaded library, ') ..
+// +gettext('Scipad doesn't know where to find its source'))
// end
// end
else
- warning(gettext('messages','Scipad cannot open a ')+typeof(f)+gettext('messages',' object!'))
+ warning(gettext('Scipad cannot open a ')+typeof(f)+gettext(' object!'))
end
if validfile then
// Tcl handles the filenames correctly with any path separator but on Windows the separator
else
// with_tk() is %f
clearglobal SCIPADISSTARTING
- error(gettext('errors','Scilab has not been built with Tcl/Tk: Scipad unavailable.'))
+ error(gettext('Scilab has not been built with Tcl/Tk: Scipad unavailable.'))
end
clearglobal SCIPADISSTARTING
endfunction
end
lang2=basename(msgfile2)
//find missing entries and write the result file
- disp(gettext('messages','Finding missing entries in ')+msgfile2+gettext('messages',' and writing the result...'))
- report(1)=gettext('messages','Translations missing in file ')+msgfile2+":";
+ disp(gettext('Finding missing entries in ')+msgfile2+gettext(' and writing the result...'))
+ report(1)=gettext('Translations missing in file ')+msgfile2+":";
report(2)=""; j=2; section1=""; k=1
revfile=msgfile2+".rev"
mdelete(revfile)
mclose(fd)
//unused strings
- disp(gettext('messages','Finding unused entries in ') +msgfile2+"...")
+ disp(gettext('Finding unused entries in ') +msgfile2+"...")
j=j+1; report(j)="";
- j=j+1; report(j)=gettext('messages','Unused strings in file ')+msgfile2+":";
+ j=j+1; report(j)=gettext('Unused strings in file ')+msgfile2+":";
section1=""
for i=1:size(M1_2,1)
if ~or(M1_1==M1_2(i)) then
function [M1,M2,after,lastcomment]=msglist(msgfile)
- disp(gettext('messages','Parsing file ')+msgfile+gettext('messages',', be patient...'))
+ disp(gettext('Parsing file ')+msgfile+gettext(', be patient...'))
lang=basename(msgfile)
//read the file
M=""; i=1
M2(k)=strsubst(strsubst(a2,"\u022","\"""),"\u05c","\\");
after(k)=j-1; k=k+1
else
- write(%io(2),gettext('messages','WARNING: THE FOLLOWING LINE SEEMS WRONG HERE AND WILL BE IGNORED'))
+ write(%io(2),gettext('WARNING: THE FOLLOWING LINE SEEMS WRONG HERE AND WILL BE IGNORED'))
write(%io(2),a)
end
a1=a;
k=find(part(TableProperties,1:length(str))==str);
if (k == []) then
- disp(gettext('errors','Error in Property specification : bad argument specified.'));
+ disp(gettext('Error in Property specification : bad argument specified.'));
PName='';
return;
end
k=find(part(TableStyle,1:length(str))==str);
if (k == []) then
- disp(gettext('errors','Error in Property specification : bad argument specified.'));
+ disp(gettext('Error in Property specification : bad argument specified.'));
SName='';
return;
end
// Allan CORNET
// INRIA 2005
function TK_EvalFile(f1)
- printf(gettext('messages','Warning TK_EvalFile obsolete please use TCL_EvalFile.'));
+ printf(gettext('Warning TK_EvalFile obsolete please use TCL_EvalFile.'));
TCL_EvalFile(f1)
endfunction
\ No newline at end of file
// Allan CORNET
// INRIA 2005
function TK_EvalStr(Str)
- printf(gettext('messages','Warning TK_EvalStr obsolete please use TCL_EvalStr.'));
+ printf(gettext('Warning TK_EvalStr obsolete please use TCL_EvalStr.'));
TCL_EvalStr(Str)
endfunction
\ No newline at end of file
// Allan CORNET
// INRIA 2005
function ret=TK_GetVar(Var)
- printf(gettext('messages','Warning TK_GetVar obsolete please use TCL_GetVar.'));
+ printf(gettext('Warning TK_GetVar obsolete please use TCL_GetVar.'));
ret=TCL_GetVar(Var)
endfunction
\ No newline at end of file
// Allan CORNET
// INRIA 2005
function ret=TK_SetVar(Var,Val)
- printf(gettext('messages','Warning TK_SetVar obsolete please use TCL_SetVar.'));
+ printf(gettext('Warning TK_SetVar obsolete please use TCL_SetVar.'));
ret=TCL_SetVar(Var,Val)
endfunction
\ No newline at end of file
doerror=%t;
answer=0;
if (rhs==0) then
- mes=gettext('messages','This is an example'),
+ mes=gettext('This is an example'),
bt="quit"
rhs=2;
end
if (IsAScalar(varargin(1))==%T) then
h=TCL_scf(varargin(1));
else
- error(gettext('errors','figure : invalid value type.'),999);
+ error(gettext('figure : invalid value type.'),999);
end
else
if (modulo(Rhs,2)==0) then
// nbr params paire
if (IsAScalar(varargin(1))==%T) then
- error(gettext('errors','figure : invalid value type.'),999)
+ error(gettext('figure : invalid value type.'),999)
else
h=TCL_scf(0);
for i=1:2:Rhs
if ( GetUiControlValueType(GetUiControlPropertyName(varargin(i))) == 10) then
error(string(varargin(i+1))+' Value must be a string.',999);
else
- error(string(varargin(i+1))+gettext('errors',' Value must be numeric.'),999);
+ error(string(varargin(i+1))+gettext(' Value must be numeric.'),999);
end
else
set(h,GetUiControlPropertyName(varargin(i)),varargin(i+1));
for i=2:2:Rhs
if ( type(varargin(i+1)) <> GetUiControlValueType(GetUiControlPropertyName(varargin(i))) ) then
if ( GetUiControlValueType(GetUiControlPropertyName(varargin(i))) == 10) then
- error(string(varargin(i+1))+gettext('errors',' Value must be a string.'),999);
+ error(string(varargin(i+1))+gettext(' Value must be a string.'),999);
else
- error(string(varargin(i+1))+gettext('errors',' Value must be numeric.'),999);
+ error(string(varargin(i+1))+gettext(' Value must be numeric.'),999);
end
else
set(h,GetUiControlPropertyName(varargin(i)),varargin(i+1));
end
end
else
- error(gettext('errors','figure : invalid value type.'),999) ;
+ error(gettext('figure : invalid value type.'),999) ;
end
end
end
if (ierr== 0) then
tklib=libname+getdynlibext()+'.0';
else
- mprintf(gettext('messages','Warning: Error loading ')+libname+getdynlibext()+' :""'+lasterror()+'""')
+ mprintf(gettext('Warning: Error loading ')+libname+getdynlibext()+' :""'+lasterror()+'""')
end
end
clear libname;
if (rhs==0) then
// Create a new Progression bar with default values
allok=%t;
- m1=gettext('messages','Progression bar');
+ m1=gettext('Progression bar');
end
if ((rhs==1)&(type(h)==1)) then
%HELPS=[%helps_modules;%helps];
nfil=size(%HELPS,1);
fid=mopen(TMPDIR+'/browsehelp.txt','w');
- cwindow=progressionbar(gettext('messages','Parsing help files ...'));
+ cwindow=progressionbar(gettext('Parsing help files ...'));
cdir=pwd();
for j=1:nfil,
procFile=pathconvert(%HELPS(j,1),%f);
_title="";
end
if argn(2)<=2
- _button=gettext('menus','Cancel');
+ _button=gettext('Cancel');
end
function p=tk_getdir(startdir,title)
- if ~with_tk() then error(gettext('errors','Tcl/Tk interface not defined.')),end
+ if ~with_tk() then error(gettext('Tcl/Tk interface not defined.')),end
arg=''
if exists("startdir","local")==1 then
startdir=pathconvert(startdir,%f,%t)
function [p] = tk_getfile(file_mask,path,Title,multip)
if ~with_tk() then
- error(gettext('errors','Tcl/Tk interface not defined.'));
+ error(gettext('Tcl/Tk interface not defined.'));
end;
arg = ""
if exists("file_mask","local")==1 then
function p=tk_savefile(file_mask,path,Title,foo)
- if ~with_tk() then error(gettext('errors','Tcl/Tk interface not defined.')),end
+ if ~with_tk() then error(gettext('Tcl/Tk interface not defined.')),end
arg=''
if exists('file_mask','local')==1 then
TCL_SetVar("ftypes",'{""Requested Extensions"" {'+file_mask+'} }')
TCL_scf(TCL_gcf());
else
if (Rhs <3) then
- error(gettext('messages','Too many input arguments.'),999);
+ error(gettext('Too many input arguments.'),999);
else
[bOK,k]=TestParamUiControl(varargin,2);
h=evstr(TCL_GetVar('TclScilabTmpVar'));
TCL_UnsetVar('TclScilabTmpVar');
else
- error(string(FigureHandle)+gettext('errors',' Value must be numeric.'),999);
+ error(string(FigureHandle)+gettext(' Value must be numeric.'),999);
end
endfunction
// -----------------------------------------------------------
else
[bOK,k]=TestParamUiMenu(varargin,2);
if ( bOK == %F) then
- error(gettext('errors','Incorrect property ')+string(varargin(k)),999);
+ error(gettext('Incorrect property ')+string(varargin(k)),999);
else
hPar=varargin(1);
h=CreateUiMenu(hPar);
doerror=%t;
if (rhs==0) then
- m1=gettext('errors','This is an example');
+ m1=gettext('This is an example');
doerror=%f;
end
M=varargin(2);
if (size(Y) == [1,1]) & (size(M) == [1,1]) then
else
- error(gettext('errors','Y and M must be scalars.'));
+ error(gettext('Y and M must be scalars.'));
end
- if (M < 1) | (M > 12) then error(gettext('errors','M must contain values between 1 and 12.'));,end
+ if (M < 1) | (M > 12) then error(gettext('M must contain values between 1 and 12.'));,end
c=[Y,M,1];
break
else
- error(gettext('errors','Number of parameters incorrect.'));
+ error(gettext('Number of parameters incorrect.'));
end
- mths = [gettext('messages','time_message_17'); ..<