作者Gwaewluin (神无月 孝臣)
看板Fortran
标题[问题] 有什麽方法可以知道档案内资料个数?
时间Sun Jan 10 00:41:31 2010
我有两个档案
一个长的像这样一行内有三个资料
1 0.0 0.0
2 0.1 0.1
3 0.2 0.2
一个长得像这样一行内有四个资料
1 0.0 0.0 0.0
2 0.1 0.1 0.1
3 0.2 0.2 0.2
请问有什麽办法可以让我判断出在读的档案一行内有几个资料呢?
--
Deserves death! I daresay he does. Many that live deserve death. And some die
that deserve life. Can you give that to them? Then be not too eager to deal out
death in the name of justice, fearing for your own safty. Even the wise cannot
see all ends.
Gandalf to Frodo
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.131.229.148
1F:推 laa7352:如果你的资料是有格式的话,可以用字串整行读下来 01/10 11:35
2F:→ laa7352:再写判断式去抓字串上面的资料 01/10 11:37
3F:→ gjohnlua:读进一行後,检查总共有几个空格可行吗?资料要够整齐.. 01/11 11:34