fgetword 
int [string]
      
fgetword は、取り消し不可能、照会不可能、および編集不可能です。
次のワード(空白文字を区切り文字とする文字列)を返します。ファイルの終わりに達した場合、何も返しません。 2 番目の引数を fgetword コマンドに渡して、既定の空白の区切り文字に代わる区切り文字を指定することができます。区切り文字列のキャラクタはワードの境界を決定するために使用されます。区切り文字列の各文字が 1 つの区切り文字として扱われます。| string | 次の単語 | 
// Make a sample file to use as a test example
//
$exampleFileName = ( `internalVar -userTmpDir` + "example.tmp" );
$fileId=`fopen $exampleFileName "w"`;
fprint $fileId "Hello there\nMEL-Developer-+Using+fgetword\n";
fclose $fileId;
// Now read it back one word at a time
//
$fileId=`fopen $exampleFileName "r"`;
string $nextWord = `fgetword $fileId`;
while ( size( $nextWord ) > 0 ) {
    print ( $nextWord + "\n" );
    $nextWord = `fgetword $fileId`;
}
fclose $fileId;
// This will print:
// Hello
// there
// MEL-Developer-+Using+fgetword
// Read it back again using "+" and "-" as separators
//
$fileId=`fopen $exampleFileName "r"`;
string $nextWord = `fgetword $fileId "+-"`;
while ( size( $nextWord ) > 0 ) {
    print ( $nextWord + "\n" );
    $nextWord = `fgetword $fileId "+-"`;
}
fclose $fileId;
// This will print:
// Hello there
// MEL
// Developer
// Using
// fgetword