3125a52331/image/source/files.retro

User picture

Commiter: Charles Childers

Author: Charles Childers

Revision: 3125a52331


File Size: 418 Bytes

(March 10, 2010 18:31 UTC) About 2 years ago

fread now returns the character read, not stores it in an address

 
Show/hide line numbers
vocab files
((
  0 constant :r   1 constant :r+  2 constant :w
  3 constant :w+  4 constant :a   5 constant :a+

{{
  : file.io ( n-f ) 4 out wait 4 in ;
---reveal---
  : fopen  ( $m-f ) -1 file.io ;
  : fread  (  h-f ) -2 file.io ;
  : fwrite ( ch-f ) -3 file.io ;
  : fclose ( h -f ) -4 file.io ;
  : fpos   ( h -n ) -5 file.io ;
  : fseek  ( nh-f ) -6 file.io ;
  : fsize  (  h-n ) -7 file.io ;
}}
))

' files shut