ClassesClassesClassesClasses | | | | Operators

fwrite_stringfwrite_stringFwriteStringfwrite_stringFwriteStringFwriteString (Operator)

Name

fwrite_stringfwrite_stringFwriteStringfwrite_stringFwriteStringFwriteString — Write values in a file.

Signature

fwrite_string( : : FileHandle, String : )

Herror fwrite_string(const Hlong FileHandle, const char* String)

Herror T_fwrite_string(const Htuple FileHandle, const Htuple String)

Herror fwrite_string(const HTuple& FileHandle, const HTuple& String)

void HFile::FwriteString(const HTuple& String) const

void FwriteString(const HTuple& FileHandle, const HTuple& String)

void HFile::FwriteString(const HTuple& String) const

void HFile::FwriteString(const HString& String) const

void HFile::FwriteString(const char* String) const

void HOperatorSetX.FwriteString(
[in] VARIANT FileHandle, [in] VARIANT String)

void HFileX.FwriteString([in] VARIANT String)

static void HOperatorSet.FwriteString(HTuple fileHandle, HTuple stringVal)

void HFile.FwriteString(HTuple stringVal)

void HFile.FwriteString(string stringVal)

Description

The operator fwrite_stringfwrite_stringFwriteStringfwrite_stringFwriteStringFwriteString puts out a string or numbers on the output file defined by the handle FileHandleFileHandleFileHandleFileHandleFileHandlefileHandle. The output file must be opened in ASCII format by the operator open_fileopen_fileOpenFileopen_fileOpenFileOpenFile. The values to be put out on the file are set in the parameter StringStringStringStringStringstringVal.

The call set_system(::'flush_file', <boolean-value>:)set_system("flush_file", <boolean-value>)SetSystem("flush_file", <boolean-value>)set_system("flush_file", <boolean-value>)SetSystem("flush_file", <boolean-value>)SetSystem("flush_file", <boolean-value>) determines whether the output characters are put out directly on the output medium. If the value 'flush_file'"flush_file""flush_file""flush_file""flush_file""flush_file" is set to 'false'"false""false""false""false""false", the characters (especially in case of screen output) show up only after the operator fnew_linefnew_lineFnewLinefnew_lineFnewLineFnewLine is called.

Strings as well as whole numbers and floating point numbers can be used as arguments. If more than one value serves as input, the values are put out consecutively without blanks.

Parallelization

Parameters

FileHandleFileHandleFileHandleFileHandleFileHandlefileHandle (input_control)  file HFile, HTupleHTupleHFile, HTupleHFileX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

File handle.

StringStringStringStringStringstringVal (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Values to be put out on the file.

Default value: 'hallo' "hallo" "hallo" "hallo" "hallo" "hallo"

Example (HDevelop)

fwrite_string(FileHandle,['text with numbers:',5,' and ',1.0])
* results in the following output:
* 'text with numbers:5 and 1.00000'

Example (C)

   fwrite_string(FileHandle,"text with numbers: ") ;
   fwrite_string(FileHandle,"5") ;
   fwrite_string(FileHandle," and ") ;
   fwrite_string(FileHandle,"1.0") ;
/* results in the following output:       */
/*    'text with numbers: 5 and 1.00000'   */

/* Tupel Version */
  int  i;
  double d;
  Htuple Tuple ;

  create_tuple(&Tuple,4) ;
  i = 5 ;
  d = 10.0 ;
  set_s(Tuple,"text with numbers: ",0) ;
  set_i(Tuple,i,1) ;
  set_s(Tuple," and ",2) ;
  set_d(Tuple,d,3) ;
  T_fwrite_string(FileHandle,HilfsTuple) ;

Example (HDevelop)

fwrite_string(FileHandle,['text with numbers:',5,' and ',1.0])
* results in the following output:
* 'text with numbers:5 and 1.00000'

Example (HDevelop)

fwrite_string(FileHandle,['text with numbers:',5,' and ',1.0])
* results in the following output:
* 'text with numbers:5 and 1.00000'

Example (HDevelop)

fwrite_string(FileHandle,['text with numbers:',5,' and ',1.0])
* results in the following output:
* 'text with numbers:5 and 1.00000'

Example (HDevelop)

fwrite_string(FileHandle,['text with numbers:',5,' and ',1.0])
* results in the following output:
* 'text with numbers:5 and 1.00000'

Result

If the writing procedure was carried out successfully, the operator fwrite_stringfwrite_stringFwriteStringfwrite_stringFwriteStringFwriteString returns the value 2 (H_MSG_TRUE). Otherwise, an exception is raised.

Possible Predecessors

open_fileopen_fileOpenFileopen_fileOpenFileOpenFile

Possible Successors

close_fileclose_fileCloseFileclose_fileCloseFileCloseFile

Alternatives

write_stringwrite_stringWriteStringwrite_stringWriteStringWriteString

See also

open_fileopen_fileOpenFileopen_fileOpenFileOpenFile, close_fileclose_fileCloseFileclose_fileCloseFileCloseFile, set_systemset_systemSetSystemset_systemSetSystemSetSystem

Module

Foundation


ClassesClassesClassesClasses | | | | Operators