mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-07-26 21:08:45 +08:00
Add file I/O
This commit is contained in:
@@ -14,4 +14,16 @@ var print=func(args...)
|
||||
var input=func()
|
||||
{
|
||||
return __call_cpp_istream_std_cin();
|
||||
};
|
||||
|
||||
# read from file and return a vector of strings
|
||||
var read=func(filename)
|
||||
{
|
||||
return __call_Cpp_ifstream(filename);
|
||||
};
|
||||
|
||||
# write a vector of strings into a file
|
||||
var write=func(filename,vector)
|
||||
{
|
||||
return __call_Cpp_ofstream(filename,vector);
|
||||
};
|
||||
Reference in New Issue
Block a user