A simple scripting language in C++
Ferenc Szontágh
2025-04-19 7b8e75d80186b67eb4a8dbf83330bc92a2bce03e
1
2
3
4
5
6
7
8
9
# File I/O Feature Test
string $f = "test_file_io.txt";
print("file_exists before create: ", file_exists($f), "\n");
file_put_contents($f, "Hello from VoidScript!", false);
print("file_exists after create: ", file_exists($f), "\n");
print("file_get_contents: ", file_get_contents($f), "\n");
# Overwrite with permission
file_put_contents($f, "Overwritten content", true);
print("file_get_contents after overwrite: ", file_get_contents($f), "\n");