0
Как в Pascal перевести число в строку?

2 ответа 2

5
var
  s:string;
  i:integer;

begin
  i:=5;
  str(i,s);
  write(s);
end.
1
  • 1
    причем здесь синтаксис?
    – andrybak
    6 мая 2012 в 17:27
1
{Str.PAS}

{ Пример программы для процедуры Str }

Function IntToStr(I : Longint) : String;
{ Преобразовывает значение типа Integer в строку }
Var S : String [11];
Begin
 Str(I, S);
 IntToStr:=S;
End;

Begin
 WriteLn(IntToStr(-5322)); { '-5332' }
End.

http://netsoftware.ucoz.ru/blog/kak_perevesti_chislo_v_tip_stroka_v_pascal_ili_inttostr_i_longint/2012-05-14-2

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.