[Info-vax] Pascal question

Dave Froble davef at tsoft-inc.com
Mon Jan 21 13:52:46 EST 2019


On 1/21/2019 12:00 PM, John Reagan wrote:
> On Monday, January 21, 2019 at 11:40:02 AM UTC-5, 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:
>>
>> 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
>
> str$upcase is about the best you'll get from Pascal.  Some folks like to use the undocumented, but popular, DBAS$EDIT() from the BASIC RTL.
>

Basic has it now ????

:-)

-- 
David Froble                       Tel: 724-529-0450
Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA  15486



More information about the Info-vax mailing list