update docs for stream-tell

db4
Doug Coleman 2009-10-03 19:39:06 -05:00
parent 770405359e
commit 84fd08d86b
2 changed files with 29 additions and 3 deletions

View File

@ -24,7 +24,22 @@ HELP: limit
" \"123456\" <string-reader> 3 stream-throws limit"
" 100 swap stream-read ."
"] [ ] recover ."
"T{ limit-exceeded }"
"""T{ limit-exceeded
{ n 1 }
{ stream
T{ limited-stream
{ stream
T{ string-reader
{ underlying "123456" }
{ i 3 }
}
}
{ mode stream-throws }
{ count 4 }
{ limit 3 }
}
}
}"""
}
"Returning " { $link f } " on exhaustion:"
{ $example

View File

@ -86,6 +86,14 @@ HELP: stream-copy
{ $description "Copies the contents of one stream into another, closing both streams when done." }
$io-error ;
HELP: stream-tell
{ $values
{ "stream" "a stream" } { "n" integer }
}
{ $description "Returns the index of the stream pointer if the stream is seekable." }
{ $notes "Stream seeking is not supported on streams that do not have a known length, e.g. TCP/IP streams." } ;
HELP: stream-seek
{ $values
{ "n" integer } { "seek-type" "a seek singleton" } { "stream" "a stream" }
@ -274,8 +282,11 @@ $nl
}
"This word is only required for string output streams:"
{ $subsections stream-nl }
"This word is for streams that allow seeking:"
{ $subsections stream-seek }
"These words are for seekable streams:"
{ $subsections
stream-tell
stream-seek
}
{ $see-also "io.timeouts" } ;
ARTICLE: "stdio-motivation" "Motivation for default streams"