Quantcast
Channel: Delphi Forum - Delphi Programming Kings of Code - Delphi Programming
Viewing all articles
Browse latest Browse all 173

Converting Char to String and String to Char for the Android platform

$
0
0
Hello everyone!
I was wondering if someone can help. I wrote the following code:Code:
PHP Code:
procedure TForm4.FormCreate(SenderTObject);
Var
 
StringInputVariable String;
 
CharVariable Char;
 
StringOutputVariable String;
begin
 StringInputVariable 
:= 'w';

 
CharVariable := Char(StringInputVariable[1]);

 
StringOutputVariable := String(CharVariable);

 
Label1.Text := StringOutputVariable;
end
When I Run for the Android platform I get absolutely no output in Label1 - I was expecting a 'w' in Label1.Text. The program compiles without any errors. When I compile for 32 - bit Windows I get a 'w' in Label1.Text as expected. My program basically takes a one character string input, then converts it to char, then converts it back to string and then writes this string on the screen as Label1. Why does this not work for the Android platform and how can I do workable conversions?

Viewing all articles
Browse latest Browse all 173

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>