[scilab-Users] petrialucian at yahoo.com sent you the following files : notepad.exe

Julio Gonzalez-Saenz julio.gonzalez at ymail.com
Fri Apr 16 16:36:34 CEST 2010


Hi

 I have clean up a little bit your program.. it had a couple of errors, specially with quotes and froward/backlash usage..

Please take a look .. maybe we can proceed from this point an on...

Julio


clear
clc

strMrVarNames =['Curent';'Power';'Torque';'Presure';'Angle'];
strMrValues = ["";"";"";"";""];
[txt]=mgetl('D:\vals.txt'); //get all lines
txt
iNrOfLines=size (txt,1);
iNrOfLines1=size(strMrVarNames,1);

for i=1:iNrOfLines
   //if we have \ '/\'
   if strindex( txt(i),'/') == 1 then
       A=(tokens(txt(i),[':'])); //Splits text in 2 coloms (value and name)
      //A(1,$); //gives the value
      //A($,1); //gives the variable
      Name=A(1,$);
      Value=A($,1);
      for j=1:iNrOfLines1
         if strcmp(Name,strMrVarNames(j)) then
             disp('OK')
             strMrValues=Value;
         else strMrValues(i)='NULL';
         end//if
       end//for
    end //if
end
strMrValues
strMrVarNames 





________________________________
From: Sylvestre Ledru <sylvestre.ledru at scilab.org>
To: users at lists.scilab.org
Sent: Fri, 16 April, 2010 9:50:08
Subject: Re: [scilab-Users] petrialucian at yahoo.com sent you the following files : notepad.exe

Please, could you avoid sending email with notepad.exe, your email are
hard to read on some mailers.

Thanks
Sylvestre


Le vendredi 16 avril 2010 à 10:36 +0300, transfer.ro a écrit :
> Transfer.ro 
> petrialucian at yahoo.com ti-a trimis
> fisiere folosind Transfer.ro
> impreuna cu urmatorul mesaj:
> 
> 
> petrialucian at yahoo.com has sent you
> some files using Transfer.ro with
> the following message:
> 
> 
> Pls Help me with this program. What
> i want to do is :
> I have 1 txt file that looks like
> this :
> /Curent : 99
> /Power : 12345
> /Name : ABCDEF
> /Presure : 991234
> /Name1 : dfmne
> -------------------------
> 12345
> 678910
> -111213
> -141516
> -171819
> 
> And i what to process the
> information. So if i enter from the
> keyboard Curent the program should
> show me it\'s value, that is \"99
> \"...and soo on. Thenumbers below
> the \"-----------\" should be in 2
> vectors, one V1 for positive nr and
> V2 for negative. I made this for a
> startes but it doesn\'t work :( .
> Pls give me some hints soo and cand
> get on with it ! TKS A LOT
> 
> ///
> strMrVarNames =[\"Curent\";\"Power
> \";\"Torque\";\"Presure\";\"Angle
> \"];
> strMrValues = [\"\";\"\";\"\";\"\";
> \"\"];
> [txt]=mgetl(\'Var_fin.txt\'); //get
> all lines
> iNrOfLines=size (txt,1);
> iNrOfLines1=size(strMrVarNames,1)
> for i=1:iNrOfLines
> txt(i);
> //if we have \ '/\'
> if strindex( txt(i),\'/\') == 1
> then
> 
> A=(tokens(txt(i),[\'/\',\':
> \']))\'; //Splits text in 2 coloms
> (value and name)
> //A(1,$); //gives the value
> //A($,1); //gives the variable
> 
> Name=A($,1)
> Value=A(1,$);
> for j=1:iNrOfLines1
> val;
> strMrVarNames(j);
> if
> strcmp(Name,strMrVarNames(i,j))==1
> then
> disp(\"OK\")
> strMrValues=Value;
> else strMrValues(i)=\"null\";
> 
> end//if
> end//for
> end //if
> end
> strMrValues
> strMrVarNames
> 
> Fisierele care ti-au fost
> transferate sunt 
> notepad.exe
> Click pe linkul de mai jos pentru a
> le downloada: 
> Click on the link below to download
> the files: 
> http://www.transfer.ro/storage/transfer_ro-16Apr-6fea271b8c.zip
> Fisierele vor fi sterse automat
> dupa 10 zile.
> The files will be deleted
> automaticaly after 10 days.
> Pentru a salva fisierele in
> calculator click iar apoi alegeti'
> Save AS'
> Transfer.ro este un serviciu
> profesional securizat care permite
> transferul de fisiere mari (pana la
> 1GB) catre orice adresa de e-mail. 
> 
> Pentru sugestii,probleme sau
> feedback ne puteti contacta la
> simina at transfer.ro sau telefonic
> Luni-Vineri intre orele 10-18 la
> 031-710.10.73 
> 
> 
> 
> 
12345
678910
-111213
-141516
-171819

And i what to process the information. So if i enter from the keyboard
Curent the program should show me it\'s value, that is \"99\"...and soo
on. Thenumbers below the \"-----------\" should be in 2 vectors, one V1
for positive nr and V2 for negative. I made this for a startes but it
doesn\'t work :( . Pls give me some hints soo and cand get on with it !
TKS A LOT

///
strMrVarNames =[\"Curent\";\"Power\";\"Torque\";\"Presure\";\"Angle\"];
strMrValues = [\"\";\"\";\"\";\"\";\"\"];
[txt]=mgetl(\'Var_fin.txt\'); //get all lines
iNrOfLines= size (txt,1);
iNrOfLines1=size(strMrVarNames,1)
for i=1:iNrOfLines
txt(i);
//if we have \'/\'
if strindex( txt(i),\'/\') == 1 then

A=(tokens(txt(i),[\'/\',\':\']))\'; //Splits text in 2 coloms (value and
name)
//A(1,$); //gives the value
//A($,1); //gives the variable

Name=A($,1)
Value=A(1,$);
for j=1:iNrOfLines1
val;
strMrVarNames(j);
if strcmp(Name,strMrVarNames(i,j))==1 then
disp(\"OK\")
strMrValues=Value;
else strMrValues(i)=\"null\";

end//if
end//for
end //if
end
strMrValues
strMrVarNames<<


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100416/f7f007a6/attachment.htm>


More information about the users mailing list