<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


#PUT Search:

In File I/O Words in TurboForth Kernal

Word Name: #PUT
Type: Standard word
Data Stack Signature: buf_addr len file_id -- flag
Return Stack Signature: --
Availability: V1.0  V1.1  V1.2
Description:

Writes a string from buffer_addr with length len to the file represented by file_id.

Example:

none

Comment:

Returns FALSE if successful, else returns TRUE. This can be trapped with ABORT".

Example:

FBUF: DISK-FILE
S" DSK1.TEST DV80SO" DISK-FILE FILE

: TEST ( -- )
  DISK-FILE #OPEN ABORT" Cannot open disk file for output"
  S" This is a test" DISK-FILE #PUT
  ABORT" Cannot write to disk"
  DISK-FILE #CLOSE
;

See Also: #CLOSE  #EOF?  #GET  #OPEN  #PUT  #REC 

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>