[Info-vax] Pascal question
Arne Vajhøj
arne at vajhoej.dk
Mon Jan 21 11:41:46 EST 2019
On 1/21/2019 11:40 AM, Arne Vajhøj wrote:
> On 1/21/2019 11:19 AM, Emilio Moreno wrote:
>> Here is another one. upcase
>
> Weird. I don't seem to be able to find anything better
> than:
[inherit('sys$library:pascal$str_routines')]
> program uc(input,output);
>
> type
> string = varying [255] of char;
>
> function upcase(s : string) : string;
>
> var
> tmp : string;
>
> begin
> str$upcase(tmp.body, s.body);
> tmp.length := s.length;
> upcase := tmp;
> end;
>
> var
> s1, s2 : string;
>
> begin
> s1 := 'abc';
> s2 := upcase(s1);
> writeln(s1,'->',s2);
> end.
Arne
More information about the Info-vax
mailing list