こんにちは。naoともうします。
プログラム用に加工していない(つまり、普通の)英文のテキストを読み込んで、
「,(カンマ)」「.(ピリオド)」「改行」を区切りとして、
配列変数に代入したいと考えています。
例えば、以下のようなテキストだとすると、
It is one hour thirty Universal Time. I'm Jim Tetter in
Washington.(改行)
(改行)
Rain has slowed Chinese rescue teams who are working to save
thousands of people buried under collapsed buildings across
<Sichuan> province.
以下のA案あるいはB案のように、配列変数に代入したいのです。
A案
a(0)="It is one hour thirty Universal Time."
a(1)=" I'm Jim Tetter in Washington.(改行)"
a(2)="(改行)"
a(3)="Rain has slowed Chinese rescue teams who are working
to save thousands of people buried under collapsed buildings
across <Sichuan> province."
B案(区切り文字そのものも単独で変数に代入する)
a(0)="It is one hour thirty Universal Time"
a(1)="."
a(2)=" I'm Jim Tetter in Washington"
a(3)="."
a(4)="(改行)"
a(5)="(改行)"
a(6)="Rain has slowed Chinese rescue teams who are working
to save thousands of people buried under collapsed buildings
across <Sichuan> province"
a(7)="."
区切り文字が一種類なら、getstrを使ってできたのですが、
区切り文字が複数になると、どうしたらよいかわからず、困ってい
ます。
また、改行の扱いもよくわかっていません。
(mes命令で、\nを表示すれば改行されることはわかるのですが・・・)
ヒントだけでもご教授いただければ、幸いです。
どうかよろしくお願いいたします。