Difference between revisions of "CoCoA:OpenIString"
From ApCoCoAWiki
(pushing XML rev. 1.46, again) |
(No difference)
|
Latest revision as of 10:02, 24 October 2007
OpenIString
open input string
Description
This function open strings for input. The string S
serves as the name of the device opened for input or output; one may
use the empty string. OpenIString is used to read input from the string T with the help of <ttref>Get</ttref>.
Example
S := <quotes>hello world</quotes>; D := OpenIString(<quotes/>,S); -- open the string S for input to CoCoA L := Get(D,7); -- read 7 characters from the string L; -- ascii code [104, 101, 108, 108, 111, 32, 119] ------------------------------- Ascii(L); -- convert ascii code to characters hello w ------------------------------- Close(D); -- close device D
Syntax
OpenIString(S:STRING,T:STRING):DEVICE OpenOString(S:STRING):DEVICE
<type>io</type> <type>printing</type> <type>string</type>