Pascal

Pascal — это императивный язык программирования, разработанный Никлаусом Виртом в 1970 в качестве языка обучения структурному программированию. Название языку дано в честь выдающегося французского математика, физика, литератора и философа Блеза Паскаля. Первоначально язык компилировался в байт-код, подобно языку Java.

Особенностями языка являются строгая типизация и наличие средств структурного (процедурного) программирования. Паскаль был одним из первых таких языков. По мнению Н. Вирта, язык должен способствовать дисциплинированию программирования, поэтому, наряду со строгой типизацией, в Паскале сведены к минимуму возможные синтаксические неоднозначности, а сам синтаксис интуитивно понятен даже при первом знакомстве с языком.

Тем не менее, первоначально язык обладал множеством недостатков: невозможность передачи функциям массивов переменной длины, отсутствие нормальных средств работы с динамической памятью, ограниченная библиотека ввода-вывода, отсутствие средств для подключения функций написанных на других языках, отсутствие средств раздельной компиляции и т. п.

Диалект Object Pascal поддерживает парадигму объектно-ориентированного программирования.

Элементы синтаксиса:

Комментарий до конца строкинет
Комментарии, которые могут быть вложенными(*...*) или {...} или (*...} или {...*)
Регистрозависимостьнет
Регулярное выражение идентификатора переменной[A-Za-z_][A-Za-z0-9_]*
Регулярное выражение идентификатора функции[A-Za-z_][A-Za-z0-9_]*
Присваивание значения переменнойvarname := value
Объявление переменнойvarname: type
Объявление переменной с присваиванием значенияvarname: type = value
Группировка выражений(… )
Блокbegin… end
Тождественное равенство=
Тождественное неравенство<>
Сравнение< > <= >=
Определение функцииfunction f(p1: type1; p2: type2; ...): returntype;
Вызов функцииf(a, b, ...)
Вызов функции без параметровf
Последовательность;
Если — тоif condition then trueBlock
Если — то — иначеif condition then trueBlock else falseBlock
Бесконечный циклwhile true do loopBody
Цикл с предусловиемwhile condition do loopBody
Цикл с постусловиемrepeat loopBody until condition
Цикл for — next для диапазона целых чисел с инкрементом на 1for i := first to last do loopBody
Цикл for — next для диапазона целых чисел с декрементом на 1for i := last downto first do loopBody

Ссылки:

IDE/Редакторы:

Примеры:

Факториал:

Пример для версий Free Pascal 1.0.6, Free Pascal 2.0.4, Free Pascal 2.2.0, Free Pascal 2.2.4, Turbo Pascal 4.0, Turbo Pascal 5.0, Turbo Pascal 5.5, Turbo Pascal 6.0, Turbo Pascal 7.0

Используется рекурсивное определение факториала.

Этот пример работает как в Turbo Pascal, так и в Free Pascal, но с несколько разным результатом. В обеих реализациях возникает арифметическое переполнение при вычислении факториалов 13-16, но Free Pascal сообщает об ошибке:

13! = Runtime error 215 at $004013C7
$004013C7
$00401449
$004063E0

в то время как Turbo Pascal не обнаруживает ошибку и просто выводит неправильные значения:

13! = 1932053504
14! = 1278945280
15! = 2004310016
16! = 2004189184

Следует отметить, что в версиях Turbo Pascal 3.0 и младше этот пример не работает из-за отсутствия типа данных longint.

<code><span class="k">program</span> <span class="n">factorial</span><span class="o">;</span><br /><br /><span class="k">function</span> <span class="nf">fact</span><span class="p"></span><span class="n">n</span><span class="o">:</span> <span class="kt">integer</span><span class="p"></span><span class="o">:</span> <span class="kt">longint</span><span class="o">;</span><br /><span class="k">begin</span><br />    <span class="k">if</span> <span class="p"></span><span class="n">n</span> <span class="o">=</span> <span class="mi">0</span><span class="p"></span> <span class="k">then</span><br />        <span class="n">fact</span> <span class="o">:=</span> <span class="mi">1</span><br />    <span class="k">else</span><br />        <span class="n">fact</span> <span class="o">:=</span> <span class="n">n</span> <span class="o">*</span> <span class="n">fact</span><span class="p"></span><span class="n">n</span> <span class="o">-</span> <span class="mi">1</span><span class="p"></span><span class="o">;</span><br /><span class="k">end</span><span class="o">;</span><br /><br /><span class="k">var</span><br />    <span class="n">n</span><span class="o">:</span> <span class="kt">integer</span><span class="o">;</span><br /><br /><span class="k">begin</span><br />    <span class="k">for</span> <span class="n">n</span> <span class="o">:=</span> <span class="mi">0</span> <span class="k">to</span> <span class="mi">16</span> <span class="k">do</span><br />        <span class="nb">writeln</span><span class="p"></span><span class="n">n</span><span class="o">,</span> <span class="s">'! = '</span><span class="o">,</span> <span class="n">fact</span><span class="p"></span><span class="n">n</span><span class="p">)</span><span class="o">;</span><br /><span class="k">end</span><span class="o">.</span><br /></code>

Числа Фибоначчи:

Пример для версий Free Pascal 2.2.4, Turbo Pascal 1.0, Turbo Pascal 2.0, Turbo Pascal 3.0, Turbo Pascal 4.0, Turbo Pascal 5.0, Turbo Pascal 5.5, Turbo Pascal 6.0, Turbo Pascal 7.0

Этот пример использует рекурсивное определение чисел Фибоначчи.

<code><span class="k">program</span> <span class="n">fibonacci</span><span class="o">;</span><br /><br /><span class="k">function</span> <span class="nf">fib</span><span class="p"></span><span class="n">n</span><span class="o">:</span><span class="kt">integer</span><span class="p"></span><span class="o">:</span> <span class="kt">integer</span><span class="o">;</span><br /><span class="k">begin</span><br />    <span class="k">if</span> <span class="p"></span><span class="n">n</span> <span class="o"><=</span> <span class="mi">2</span><span class="p"></span> <span class="k">then</span><br />        <span class="n">fib</span> <span class="o">:=</span> <span class="mi">1</span><br />    <span class="k">else</span><br />        <span class="n">fib</span> <span class="o">:=</span> <span class="n">fib</span><span class="p"></span><span class="n">n</span><span class="o">-</span><span class="mi">1</span><span class="p"></span> <span class="o">+</span> <span class="n">fib</span><span class="p"></span><span class="n">n</span><span class="o">-</span><span class="mi">2</span><span class="p"></span><span class="o">;</span><br /><span class="k">end</span><span class="o">;</span><br /><br /><span class="k">var</span><br />    <span class="n">i</span><span class="o">:</span><span class="kt">integer</span><span class="o">;</span><br /><br /><span class="k">begin</span><br />    <span class="k">for</span> <span class="n">i</span> <span class="o">:=</span> <span class="mi">1</span> <span class="k">to</span> <span class="mi">16</span> <span class="k">do</span><br />        <span class="nb">write</span><span class="p"></span><span class="n">fib</span><span class="p"></span><span class="n">i</span><span class="p"></span><span class="o">,</span> <span class="s">', '</span><span class="p"></span><span class="o">;</span><br />    <span class="nb">writeln</span><span class="p"></span><span class="s">'...'</span><span class="p"></span><span class="o">;</span><br /><span class="k">end</span><span class="o">.</span><br /></code>

Hello, World!:

Пример для версий Free Pascal 2.2.4, Turbo Pascal 1.0, Turbo Pascal 2.0, Turbo Pascal 3.0, Turbo Pascal 4.0, Turbo Pascal 5.0, Turbo Pascal 5.5, Turbo Pascal 6.0, Turbo Pascal 7.0
<code><span class="k">program</span> <span class="n">helloworld</span><span class="o">;</span><br /><br /><span class="k">begin</span><br />    <span class="nb">writeln</span><span class="p"></span><span class="s">'Hello, World!'</span><span class="p"></span><span class="o">;</span><br /><span class="k">end</span><span class="o">.</span><br /></code>

Факториал:

Пример для версий Free Pascal 2.0.4, Turbo Pascal 1.0, Turbo Pascal 2.0, Turbo Pascal 3.0, Turbo Pascal 4.0, Turbo Pascal 5.0, Turbo Pascal 5.5, Turbo Pascal 6.0, Turbo Pascal 7.0

Этот пример работает точно так же, как основной рекурсивный пример для Pascal, но использует тип real для хранения значений факториала. Команда writeln(f:-1:0) выводит дробное число f с 0 цифр после десятичной запятой и выравнивает его по левому краю.

<code><span class="k">program</span> <span class="n">factorial</span><span class="o">;</span><br /><br /><span class="k">function</span> <span class="nf">fact</span><span class="p"></span><span class="n">n</span><span class="o">:</span> <span class="kt">integer</span><span class="p"></span><span class="o">:</span> <span class="kt">real</span><span class="o">;</span><br /><span class="k">begin</span><br />    <span class="k">if</span> <span class="p"></span><span class="n">n</span> <span class="o">=</span> <span class="mi">0</span><span class="p"></span> <span class="k">then</span><br />        <span class="n">fact</span> <span class="o">:=</span> <span class="mi">1</span><br />    <span class="k">else</span><br />        <span class="n">fact</span> <span class="o">:=</span> <span class="n">n</span> <span class="o">*</span> <span class="n">fact</span><span class="p"></span><span class="n">n</span> <span class="o">-</span> <span class="mi">1</span><span class="p"></span><span class="o">;</span><br /><span class="k">end</span><span class="o">;</span><br /><br /><span class="k">var</span><br />    <span class="n">n</span><span class="o">:</span> <span class="kt">integer</span><span class="o">;</span><br /><br /><span class="k">begin</span><br />    <span class="k">for</span> <span class="n">n</span> <span class="o">:=</span> <span class="mi">0</span> <span class="k">to</span> <span class="mi">16</span> <span class="k">do</span><br />        <span class="nb">writeln</span><span class="p"></span><span class="n">n</span><span class="o">,</span> <span class="s">'! = '</span><span class="o">,</span> <span class="n">fact</span><span class="p"></span><span class="n">n</span><span class="p"></span><span class="o">:-</span><span class="mi">1</span><span class="o">:</span><span class="mi">0</span><span class="p"></span><span class="o">;</span><br /><span class="k">end</span><span class="o">.</span><br /></code>

Квадратное уравнение:

Пример для версий Free Pascal 2.2.0, Turbo Pascal 1.0, Turbo Pascal 2.0, Turbo Pascal 3.0, Turbo Pascal 4.0, Turbo Pascal 5.0, Turbo Pascal 6.0, gpc 20070904

В Pascal есть встроенный комплексный тип данных complex, но команда writeln не работает с ним напрямую (только через функции Re и Im), поэтому существенного удобства от его использования нет. Вычисления проводятся в типе real. Библиотечная функция halt позволяет выйти из текущего блока (в более поздних версиях заменена на exit).

<code><span class="k">program</span> <span class="n">Quadratic</span><span class="o">;</span><br /><br /><span class="k">var</span><br />   <span class="n">A</span><span class="o">,</span><span class="n">B</span><span class="o">,</span><span class="n">C</span><span class="o">,</span><span class="n"></span><span class="o">:</span> <span class="kt">integer</span><span class="o">;</span><br /><br /><span class="k">begin</span><br />   <span class="nb">write</span><span class="p"></span><span class="s">'A = '</span><span class="p"></span><span class="o">;</span><br />   <span class="nb">readln</span><span class="p"></span><span class="n">A</span><span class="p"></span><span class="o">;</span><br />   <span class="k">if</span> <span class="p"></span><span class="n">A</span><span class="o">=</span><span class="mi">0</span><span class="p"></span> <span class="k">then</span><br />   <span class="k">begin</span><br />      <span class="nb">writeln</span><span class="p"></span><span class="s">'Not a quadratic equation.'</span><span class="p"></span><span class="o">;</span><br />      <span class="nb">halt</span><span class="o">;</span><br />   <span class="k">end</span><span class="o">;</span><br />   <span class="nb">write</span><span class="p"></span><span class="s">'B = '</span><span class="p"></span><span class="o">;</span><br />   <span class="nb">readln</span><span class="p"></span><span class="n">B</span><span class="p"></span><span class="o">;</span><br />   <span class="nb">write</span><span class="p"></span><span class="s">'C = '</span><span class="p"></span><span class="o">;</span><br />   <span class="nb">readln</span><span class="p"></span><span class="n">C</span><span class="p"></span><span class="o">;</span><br />   <span class="n"></span> <span class="o">:=</span> <span class="n">B</span><span class="o">*</span><span class="n">B</span><span class="o">-</span><span class="mi">4</span><span class="o">*</span><span class="n">A</span><span class="o">*</span><span class="n">C</span><span class="o">;</span><br />   <span class="k">if</span> <span class="p"></span><span class="n"></span><span class="o">=</span><span class="mi">0</span><span class="p"></span> <span class="k">then</span><br />   <span class="k">begin</span><br />      <span class="nb">writeln</span><span class="p"></span><span class="s">'x = '</span><span class="o">,-</span><span class="n">B</span><span class="o">/</span><span class="mf">2.0</span><span class="o">/</span><span class="n">A</span><span class="p"></span><span class="o">;</span><br />      <span class="nb">halt</span><span class="o">;</span><br />   <span class="k">end</span><span class="o">;</span><br />   <span class="k">if</span> <span class="p"></span><span class="n"></span><span class="o">></span><span class="mi">0</span><span class="p"></span> <span class="k">then</span><br />   <span class="k">begin</span><br />      <span class="nb">writeln</span><span class="p"></span><span class="s">'x1 = '</span><span class="o">,</span><span class="p"></span><span class="o">-</span><span class="n">B</span><span class="o">+</span><span class="nb">Sqrt</span><span class="p"></span><span class="n"></span><span class="p">)</span><span class="o">/</span><span class="mf">2.0</span><span class="o">/</span><span class="n">A</span><span class="p"></span><span class="o">;</span><br />      <span class="nb">writeln</span><span class="p"></span><span class="s">'x2 = '</span><span class="o">,</span><span class="p"></span><span class="o">-</span><span class="n">B</span><span class="o">-</span><span class="nb">Sqrt</span><span class="p"></span><span class="n"></span><span class="p">)</span><span class="o">/</span><span class="mf">2.0</span><span class="o">/</span><span class="n">A</span><span class="p"></span><span class="o">;</span><br />   <span class="k">end</span><br />   <span class="k">else</span><br />   <span class="k">begin</span><br />      <span class="nb">writeln</span><span class="p"></span><span class="s">'x1 = ('</span><span class="o">,-</span><span class="n">B</span><span class="o">/</span><span class="mf">2.0</span><span class="o">/</span><span class="n">A</span><span class="o">,</span><span class="s">','</span><span class="o">,</span><span class="nb">Sqrt</span><span class="p"></span><span class="o">-</span><span class="n"></span><span class="p"></span><span class="o">/</span><span class="mf">2.0</span><span class="o">/</span><span class="n">A</span><span class="o">,</span><span class="s">')'</span><span class="p"></span><span class="o">;</span><br />      <span class="nb">writeln</span><span class="p"></span><span class="s">'x2 = ('</span><span class="o">,-</span><span class="n">B</span><span class="o">/</span><span class="mf">2.0</span><span class="o">/</span><span class="n">A</span><span class="o">,</span><span class="s">','</span><span class="o">,-</span><span class="nb">Sqrt</span><span class="p"></span><span class="o">-</span><span class="n"></span><span class="p"></span><span class="o">/</span><span class="mf">2.0</span><span class="o">/</span><span class="n">A</span><span class="o">,</span><span class="s">')'</span><span class="p"></span><span class="o">;</span><br />   <span class="k">end</span><span class="o">;</span><br /><span class="k">end</span><span class="o">.</span><br /></code>

CamelCase:

Пример для версий Free Pascal 2.2.4, Turbo Pascal 4.0, Turbo Pascal 5.0, Turbo Pascal 5.5, Turbo Pascal 6.0, gpc 20070904

Программа обрабатывает строку посимвольно. Для определения того, является ли символ буквой, и если является, то в каком он регистре, используются ASCII-коды символов. Функция ord возвращает ASCII-код данного символа, а chr — символ по его коду. Размерность строк не задана и по умолчанию принимается равной 255.

Отметим, что в Turbo Pascal программа работает только начиная с версии 4.0; в более ранних версиях не было типа данных char.

<code><span class="k">program</span> <span class="n">Camelcase</span><span class="o">;</span><br /><br /><span class="k">var</span><br />    <span class="n">text</span><span class="o">,</span> <span class="n">cc</span><span class="o">:</span> <span class="k">string</span><span class="o">;</span><br />    <span class="n">c</span><span class="o">:</span> <span class="kt">char</span><span class="o">;</span><br />    <span class="n">i</span><span class="o">:</span> <span class="kt">integer</span><span class="o">;</span><br />    <span class="n">lastSpace</span><span class="o">:</span> <span class="kt">boolean</span><span class="o">;</span><br /><br /><span class="k">begin</span><br />    <span class="nb">readln</span><span class="p"></span><span class="n">text</span><span class="p"></span><span class="o">;</span><br />    <span class="n">lastSpace</span> <span class="o">:=</span> <span class="k">true</span><span class="o">;</span><br />    <span class="n">cc</span> <span class="o">:=</span> <span class="s">''</span><span class="o">;</span><br />    <span class="k">for</span> <span class="n">i</span> <span class="o">:=</span> <span class="mi">1</span> <span class="k">to</span> <span class="nb">Length</span><span class="p"></span><span class="n">text</span><span class="p"></span> <span class="k">do</span><br />    <span class="k">begin</span><br />        <span class="n">c</span> <span class="o">:=</span> <span class="n">text</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">;</span><br />        <span class="k">if</span> <span class="p">(</span><span class="n">c</span> <span class="o">>=</span> <span class="sc">#65</span><span class="p"></span> <span class="k">and</span> <span class="p"></span><span class="n">c</span> <span class="o"><=</span> <span class="sc">#90</span><span class="p">)</span> <span class="k">or</span> <span class="p">(</span><span class="n">c</span> <span class="o">>=</span> <span class="sc">#97</span><span class="p"></span> <span class="k">and</span> <span class="p"></span><span class="n">c</span> <span class="o"><=</span> <span class="sc">#122</span><span class="p">)</span> <span class="k">then</span><br />        <span class="k">begin</span><br />            <span class="k">if</span> <span class="p"></span><span class="n">lastSpace</span><span class="p"></span> <span class="k">then</span><br />            <span class="k">begin</span><br />                <span class="k">if</span> <span class="p">(</span><span class="n">c</span> <span class="o">>=</span> <span class="sc">#97</span><span class="p"></span> <span class="k">and</span> <span class="p"></span><span class="n">c</span> <span class="o"><=</span> <span class="sc">#122</span><span class="p">)</span> <span class="k">then</span><br />                    <span class="n">c</span> <span class="o">:=</span> <span class="nb">chr</span><span class="p"></span><span class="nb">ord</span><span class="p"></span><span class="n">c</span><span class="p"></span> <span class="o">-</span> <span class="mi">32</span><span class="p"></span><span class="o">;</span><br />            <span class="k">end</span><br />            <span class="k">else</span><br />                <span class="k">if</span> <span class="p">(</span><span class="n">c</span> <span class="o">>=</span> <span class="sc">#65</span><span class="p"></span> <span class="k">and</span> <span class="p"></span><span class="n">c</span> <span class="o"><=</span> <span class="sc">#90</span><span class="p">)</span> <span class="k">then</span><br />                    <span class="n">c</span> <span class="o">:=</span> <span class="nb">chr</span><span class="p"></span><span class="nb">ord</span><span class="p"></span><span class="n">c</span><span class="p"></span> <span class="o">+</span> <span class="mi">32</span><span class="p"></span><span class="o">;</span><br />            <span class="n">cc</span> <span class="o">:=</span> <span class="n">cc</span> <span class="o">+</span> <span class="n">c</span><span class="o">;</span><br />            <span class="n">lastSpace</span> <span class="o">:=</span> <span class="k">false</span><span class="o">;</span><br />        <span class="k">end</span><br />        <span class="k">else</span><br />            <span class="n">lastSpace</span> <span class="o">:=</span> <span class="k">true</span><span class="o">;</span><br />    <span class="k">end</span><span class="o">;</span><br />    <span class="nb">writeln</span><span class="p"></span><span class="n">cc</span><span class="p"></span><span class="o">;</span><br /><span class="k">end</span><span class="o">.</span> <br /></code>

CamelCase:

Пример для версий Free Pascal 2.2.4, Turbo Pascal 4.0, Turbo Pascal 5.0, Turbo Pascal 5.5, Turbo Pascal 6.0, gpc 20070904

Пример использует такую же логику, как и предыдущий, но для проверки того, является ли символ буквой, используются множества символов lower и upper. Это делает код более читабельным.

Отметим, что в Turbo Pascal программа работает, начиная с версии Turbo Pascal 4.0, в которой впервые появляется тип данных char.

<code><span class="k">program</span> <span class="n">Camelcase</span><span class="o">;</span><br /><br /><span class="k">var</span><br />    <span class="n">text</span><span class="o">,</span> <span class="n">cc</span><span class="o">:</span> <span class="k">string</span><span class="p">[</span><span class="mi">100</span><span class="p">]</span><span class="o">;</span><br />    <span class="n">c</span><span class="o">:</span> <span class="kt">char</span><span class="o">;</span><br />    <span class="n">i</span><span class="o">:</span> <span class="kt">integer</span><span class="o">;</span><br />    <span class="n">lastSpace</span><span class="o">:</span> <span class="kt">boolean</span><span class="o">;</span><br />    <span class="n">upper</span><span class="o">,</span> <span class="n">lower</span><span class="o">:</span> <span class="k">set</span> <span class="k">of</span> <span class="kt">char</span><span class="o">;</span><br /><br /><span class="k">begin</span><br />    <span class="n">upper</span> <span class="o">:=</span> <span class="p">[</span><span class="s">'A'</span><span class="o">..</span><span class="s">'Z'</span><span class="p">]</span><span class="o">;</span><br />    <span class="n">lower</span> <span class="o">:=</span> <span class="p">[</span><span class="s">'a'</span><span class="o">..</span><span class="s">'z'</span><span class="p">]</span><span class="o">;</span><br />    <span class="nb">readln</span><span class="p"></span><span class="n">text</span><span class="p"></span><span class="o">;</span><br />    <span class="n">lastSpace</span> <span class="o">:=</span> <span class="k">true</span><span class="o">;</span><br />    <span class="n">cc</span> <span class="o">:=</span> <span class="s">''</span><span class="o">;</span><br />    <span class="k">for</span> <span class="n">i</span> <span class="o">:=</span> <span class="mi">1</span> <span class="k">to</span> <span class="nb">Length</span><span class="p"></span><span class="n">text</span><span class="p"></span> <span class="k">do</span><br />    <span class="k">begin</span><br />        <span class="n">c</span> <span class="o">:=</span> <span class="n">text</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">;</span><br />        <span class="k">if</span> <span class="p"></span><span class="n">c</span> <span class="k">in</span> <span class="n">lower</span><span class="p"></span> <span class="k">or</span> <span class="p"></span><span class="n">c</span> <span class="k">in</span> <span class="n">upper</span><span class="p"></span> <span class="k">then</span><br />        <span class="k">begin</span><br />            <span class="k">if</span> <span class="p"></span><span class="n">lastSpace</span><span class="p"></span> <span class="k">then</span> <span class="cm">{ convert to uppercase }</span><br />            <span class="k">begin</span><br />                <span class="k">if</span> <span class="p"></span><span class="n">c</span> <span class="k">in</span> <span class="n">lower</span><span class="p"></span> <span class="k">then</span><br />                    <span class="n">c</span> <span class="o">:=</span> <span class="nb">chr</span><span class="p"></span><span class="nb">ord</span><span class="p"></span><span class="n">c</span><span class="p"></span> <span class="o">-</span> <span class="mi">32</span><span class="p"></span><span class="o">;</span><br />            <span class="k">end</span><br />            <span class="k">else</span> <span class="cm">{ convert to lowercase }</span><br />                <span class="k">if</span> <span class="p"></span><span class="n">c</span> <span class="k">in</span> <span class="n">upper</span><span class="p"></span> <span class="k">then</span><br />                    <span class="n">c</span> <span class="o">:=</span> <span class="nb">chr</span><span class="p"></span><span class="nb">ord</span><span class="p"></span><span class="n">c</span><span class="p"></span> <span class="o">+</span> <span class="mi">32</span><span class="p"></span><span class="o">;</span><br />            <span class="n">cc</span> <span class="o">:=</span> <span class="n">cc</span> <span class="o">+</span> <span class="n">c</span><span class="o">;</span><br />            <span class="n">lastSpace</span> <span class="o">:=</span> <span class="k">false</span><span class="o">;</span><br />        <span class="k">end</span><br />        <span class="k">else</span><br />            <span class="n">lastSpace</span> <span class="o">:=</span> <span class="k">true</span><span class="o">;</span><br />    <span class="k">end</span><span class="o">;</span><br />    <span class="nb">writeln</span><span class="p"></span><span class="n">cc</span><span class="p"></span><span class="o">;</span></code>
Обсудить у себя 0
Комментарии (0)
Чтобы комментировать надо зарегистрироваться или если вы уже регистрировались войти в свой аккаунт.

Войти через социальные сети:

Marina
Marina
Была на сайте никогда
тел: +380665011134
Читателей: 7 Опыт: 0 Карма: 1
Я в клубах
Фотографируем Пользователь клуба
Inks under the skin Пользователь клуба
все 1 Мои друзья