caispring 发表于 2007-12-21 11:28

请教如何读取带有逗号的数据

我这里有一组数据,前面几行没有逗号,后面的有逗号,请问文件读写时,如何用浮点型读取?希望大家能给予解答,谢谢.
         .0100   .0400   .0433   .0468   .0507   .0548
         .0593   .0642   .0695   .0752   .0814   .0880
         .0953   .1031   .1115   .1207   .1306   .1413
         .1529   .1655   .1790   .1937   .2096   .2268
      .267651E+02, .275628E+02, .279297E+02, .257730E+02, .273139E+02, .299596E+02,
      .317700E+02, .329799E+02, .348950E+02, .332553E+02, .358610E+02, .378504E+02,
      .407560E+02, .461518E+02, .479483E+02, .560348E+02, .559511E+02, .579179E+02,
      .532091E+02, .612285E+02, .650702E+02, .580178E+02, .674307E+02, .676304E+02,
      .646511E+02, .664511E+02, .677602E+02, .652890E+02, .531958E+02, .437930E+02,
      .404322E+02, .370464E+02, .392866E+02, .376958E+02, .325453E+02, .351145E+02,
      .290103E+02, .263578E+02, .201695E+02, .181507E+02, .188530E+02, .165427E+02,

eight 发表于 2007-12-21 11:53

原帖由 caispring 于 2007-12-21 11:28 发表 http://www.chinavib.com/forum/images/common/back.gif
我这里有一组数据,前面几行没有逗号,后面的有逗号,请问文件读写时,如何用浮点型读取?希望大家能给予解答,谢谢.
         .0100   .0400   .0433   .0468   .0507   .0548
         .0593   .0642 ...

参照精华帖自己动手做做
页: [1]
查看完整版本: 请教如何读取带有逗号的数据