Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

what is the delphi code to find the \" highest \"characterina user supplied stri

ID: 3613920 • Letter: W

Question

what is the delphi code to find the " highest "characterina user supplied string ( edit component). The user enters some text in an edit component, and thenclicks a butten component to have the program display the "highest"character in the string. "highest" account to the delphi/ pascalcharacter order. what is the delphi code to find the " highest "characterina user supplied string ( edit component). The user enters some text in an edit component, and thenclicks a butten component to have the program display the "highest"character in the string. "highest" account to the delphi/ pascalcharacter order.

Explanation / Answer


Dear,
Long string represents a dynamically allocated string whosemaximum length is limited only by available memory.All 32-bitDelphi versions use long strings by default.
procedure TForm1.Button1Click(Sender: TObject);
begin
var s:string;//long string declaration
ShowMessage('Enter string:');
Label1.Caption:=Edit1.Text; // edit text
s:=Label1.Caption;
s_length:=Low(s[0]); // Returns the highest value
ShowMessage('highest characters :'+s_length);
end;

I hope this will helpfulfor you.................. I hope this will helpfulfor you..................