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

22 lines
1012 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;writeln\n;
Написать одну строку текаста в файл. Это метод класса \c;\l;file\u cbot\file;\n;. Это причина, по которой мы пишем так - \c;handle.writeln()\n;¦:
\c;
\s; handle.writeln("abc");
\n;
Файл должен быть открыт для записи (\c;"w"\n;) с помощью инструкции \c;\l;open\u cbot\open;\n;. Линия автоматически заканчивается сиволами 0x0D (CR) и 0x0A (LF).
Синтаксис¦:
\s;\c;handle.writeln ( string );\n;
Примеры¦:
\c;
\s; writeln("Line of text");
\s; string s1 = "abc";
\s; string s2 = "def";
\s; writeln(s1 + " " + s2);
\n;
\t;См. также
\c;\l;file\u cbot\file;\n;, \c;\l;open\u cbot\open;\n;, \c;\l;close\u cbot\close;\n;, \c;\l;readln\u cbot\readln;\n; and \c;\l;eof\u cbot\eof;\n;.
\l;Программирование\u cbot;, \l;типы\u cbot\type; и \l;категории\u cbot\category;.