[Info-vax] Pascal question

Emilio Moreno emilioaxp at gmail.com
Mon Jan 21 13:05:53 EST 2019


On Monday, January 21, 2019 at 11:41:48 AM UTC-5, Arne Vajhøj wrote:
> 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

Thank you



More information about the Info-vax mailing list