Rebol Talk Forum  |  REBOL Discussions  |  REBOL Core  |  Topic: Using read-io on a file.......
Pages: [1] Print
Author Topic: Using read-io on a file.......  (Read 373 times)
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
Using read-io on a file.......
« on: July 30, 2004, 10:50:08 AM »

<pre>
The small script below (lifted from Carl's 'read-cgi' function)
seems to return nothing. A simple 'read %filename', of course, returns the whole file. I want records whose length is 281 chars.....they are fixed format.

It turns out that the 'read-cgi' script also fails when using the  'POST' action (that is if I submit a form with 'GET' to 'read-cgi' it returns the form fields...using 'POST', however, seems to return nothing.

This is the code:

data: make string! 281
buffer: make string! 281
port: open/direct %mcare-remit.txt
read-io port buffer 281
append data buffer
clear buffer
close port
print data  <-------------  prints nothing    ??
</pre>  
Logged
Pages: [1] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL Core  |  Topic: Using read-io on a file.......
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2008, 03:13:16 AM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2285 Posts in 594 Topics by 3699 Members
Latest Member: BypeScieple

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc