programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: Append an String to an file

From: Rick VanNorman <rick_at_forth.com>
Date: Tue, 22 Jan 2002 07:00:55 -0800

Use the pseudo-ANS file function APPEND-FILE to open
the existing file, then use WRITE-FILE to add your text
to it, then use CLOSE-FILE to finish.

S" C:\USER\APPENDTEST.FTH" APPEND-FILE THROW ( fid)
( fid) DUP S" TEST FOR STRING APPEND TO AN FILLE" ROT WRITE-FILE THROW
( fid) CLOSE-FILE THROW

Rick

*********** REPLY SEPARATOR ***********

On 1/22/2002 at 1:18 PM Schmitt Louis Jean-Pierre wrote:

>Please can you say my what is the best way for adding an strind to an
>file ?
>
>Exemple:
>
>I have the followed string
>
>S" TEST FOR STRING APPEND TO AN FILLE"
>And I will append it to the file named
>
>C:\USER\APPENDTEST.FTH
>

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives! Visit http://www.forth.com/search for details.
Received on Tue Jan 22 2002 - 07:02:48 PST

This archive was generated by hypermail 2.2.0 : Fri Nov 21 2008 - 03:04:21 PST