Reading from a file?
Jeremy @ Cowgar
jeremy at cowgar.com
Thu Jul 30 01:20:04 UTC 2009
Hello Xavier,
Here is what I came up with that compiles on 0.14. The result is
"file is NULL"
Section Header
+ name := TEST ;
Section Inherit
- parent:OBJECT := OBJECT;
Section Public
- main <-
( + entry:ENTRY;
+ file:STD_FILE;
entry := FILE_SYSTEM.get_entry "test.li";
(entry = NULL).if {
STD_ERROR.put_string "Error: File test.li does not exist!\n";
die_with_code exit_failure_code;
};
file ?= entry.open;
(file = NULL).if {
STD_ERROR.put_string "file is NULL";
die_with_code exit_failure_code;
};
file.size.println;
);
Jeremy
mailto:jeremy at cowgar.com
============
Wednesday, July 29, 2009, 7:27:07 PM, you wrote:
> On 18:58 Wed 29 Jul , Jeremy @ Cowgar wrote:
>> Hello Lisaac,
>>
>> I see FILE_INPUT_STREAM, but I am not seeing how to create a
>> STD_FILE to pass to FILE_INPUT_STREAM. Nor, in all of Lisaac do I
>> find a use of FILE_INPUT_STREAM.
> As you asked me how to open or write in a file, I put an example joined to this
> mail.
> Greetings,
More information about the Lisaac-devel
mailing list