FileTools[Text] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Input and Output : File Manipulation : FileTools : FileTools/Text/WriteCharacter

FileTools[Text]

  

WriteCharacter

  

write a single character to a file

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

WriteCharacter(file, char)

Parameters

file

-

file descriptor or filename

char

-

string of length 1

Description

• 

The WriteCharacter(file, char) command writes the character char to file.

• 

If file is the name of a file that has not been opened, Maple attempts to open the file before writing the character.  If the file does not exist, it is created.

• 

An error is raised if file is not a valid descriptor or it refers to a file that cannot be opened.

Examples

FileTools[Text][WriteCharacter]testfile,a

1

(1)

FileTools[Text][WriteCharacter]testfile,b

1

(2)

FileTools[Text][WriteCharacter]testfile,c

1

(3)

FileTools[Text][Close]testfile:

FileTools[Text][ReadString]testfile

abc

(4)

FileTools[Remove]testfile

See Also

file

FileTools[Remove]

FileTools[Text]

FileTools[Text][Close]

FileTools[Text][Open]

FileTools[Text][ReadCharacter]

FileTools[Text][ReadString]

IO_errors

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam