[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: GNU Pascal..............



Phillip,

>>a:='Hola soy Phillip';
>>n:=1;
>>while n<=length(a) do
>>begin
>>b:=' ';
>>	while a[n]<>chr(32) do
>>	begin
>>	b[n]:=a[n];
>>	n:=n+1;
>>	end;
>>writeln(b);
>>end;
>>
>>that would print me all the words that are in the a string,
>>right?  Well im not getting anything.

I'm not sure about GNU Pascal, but other Pascal variants will
allow you to assign a character to a string using simple
concatenation. For example:

  b := b+a[n];

will put the character a[n] at the end of string b.

HTH,
Harley


Reply to: