can not read all words in a ascii file

Loïc GIROD Loic.Girod at esstin.uhp-nancy.fr
Wed Feb 9 10:19:22 CET 2011


Hello !

 

I try to read the characters in the attached ASCII file.

I would like to use the strings to make a legend in a graph.

 

I use the following code : 

fd4 = mopen("P_70",'r')

x=mfscanf(-1,fd4,'%s')

 

but I get : 

x  =

 

!                !

!                 !

!des              !

!                 !

!points           !

!                 !

!de               !

!                 !

!transformations  !

!                 !

!simple           !

!                 !

!DSC              !

!                 !

!Essai            !

!                 !

!A                !

!                 !

!Air              !

!                 !

!Alu              !

!                 !

!                 !

!                 !

!A                !

!                 !

!A                !

!                 !

!A                !

!                 !

!A                !

!                 !

!A                !

!                 !

!D                !

!                 !

!D                !

 

 

As you can see, the first word is missing and I don’t understand why.

Then I have not found how to convert x in a single string.

 

Many thanks for the help

 

Best regards

 

Loïc

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110209/6c78a297/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: P_70
Type: application/octet-stream
Size: 588 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20110209/6c78a297/attachment.obj>


More information about the users mailing list