PWB Extensions Help (ext.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Replace
◄Up► ◄Contents► ◄Index► ◄Back►
─────PWB Extensions─────────────────────────────────────────────────────────
Syntax: flagType Replace( char ch, COL x, LINE y, PFILE pfFile,
flagType fInsert );
Returns: True if successful, otherwise false.
See: Getline, PutLine, ◄Processing Text►
The Replace function inserts or replaces characters one at a time.
The character <ch> is the new character. It goes into the file
specified by <pfFile> at column <x>, row <y>. If <fInsert> is
FALSE, it replaces the character at the given position. If
<fInsert> is TRUE, it is inserted at the given position.
Replace is typically used in a loop to insert or replace sequences
of characters. Alternatively, you can get a copy of a line with
GetLine, modify the copy, and then replace the original line with
PutLine.
-♦-