colobot-data/help/cbot/R/open.txt

21 lines
962 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

\b;Инструкция \c;open\n;
Открывает текстовой файл. Это метод класса \c;\l;file\u cbot\file;\n;. Это причина, почему мы всегда пишем \c;handle.open()\n;¦:
\c;
\s; handle.open("test.txt", "w");
\n;
Для открытия файла необходимо выполнить¦:
\c;
\s; file handle();
\s; handle.open("filename", "w");
\s; handle.writeln("abc");
\s; handle.close();
\n;
\c;"r"\n; mode: открыть для чтения.
\c;"w"\n; mode: открыть для записи.
Файлы могут находиться только в папке с установленной игрой.
\t;См. также
\c;\l;file\u cbot\file;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;readln\u cbot\readln;\n;, \c;\l;writeln\u cbot\writeln;\n; and \c;\l;eof\u cbot\eof;\n;.
\l;Программирование\u cbot;, \l;типы\u cbot\type; и \l;категории\u cbot\category;.