Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Document$ is a string expression containing a source document
  • Search$ is a string expression containing a search string which is to be replaced or marks a spot in Document$. Can be "NullString" to insert sentences (see remarks and examples).
  • InsRepDoc$ is InsRepDoc$ is a string expression containing either a string or a document, replacing Search$ (Pos% = 0)or to be inserted on a specific location indicated by Pos% and marked bySearch$
  • Pos% is the position in Document$:

...

 Pos% = 0

 Search$ = "lost" InsRepDoc$

 InsRepDoc$ = "lost"

So: 

returns:


Add , and immediately behind loosed:

Pos% = 1

Search$ = "loosed"

InsRepDoc$ = ", and"

 So: 

returns:


Add -dimmed immediately before  tide, including the space, so make sure to define " tide":

Pos% = -1

Search$ = " tide"

InsRepDoc$ = ", -dimmed"

So: 

returns:

...

Pos% = 1

Search$ = "NullString"

InsRepDoc$ = "Mere anarchy is loosed upon the world"

...

Pos% = -2

Search$ = "NullString"

InsRepDoc$ = "Turning and turning in the widening gyre" 

...

 Pos% = 2: the insert will be done (Pos%-1) lines after the line with Search$

Search$ = "widening"

InsRepDoc$ = "The falcon cannot hear the falconer;"

...

Pos% = -2: the insert will be done -2 lines before the line with Search$

Search$ = "widening"

InsRepDoc$ = "The Second Coming"  

So: 

...