Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: From Array[0..50] of Byte to TValue


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Jan 17, 2015 6:44 AM Last Post By: Poul Kristensen
Poul Kristensen

Posts: 7
Registered: 9/27/00
From Array[0..50] of Byte to TValue  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 16, 2015 3:27 AM
Hi

I receive data on my Android as
Array[0..50] of Char
. But I cannot convert them to
tValue
.

Actually, I seem to have general problems converting data from one char to another - does anyone know of a general description of some kind?

Best regards

Poul

Edited by: Poul Kristensen on Jan 16, 2015 3:27 AM
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: From Array[0..50] of Byte to TValue [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 16, 2015 11:26 AM   in response to: Poul Kristensen in response to: Poul Kristensen
Poul wrote:

I receive data on my Android as
Array[0..50] of Char
.
But I cannot convert them to
tValue
.

TValue has a FromArray() method, eg:

type
  TMyArray = array[0..50] of Char;
var
  Arr: TMyArray;
  V: TValue;
begin
  V := TValue.FromArray(TypeInfo(TMyArray), Arr);
end;


Actually, I seem to have general problems converting data from one
char to another - does anyone know of a general description of some
kind?

What exactly are you having trouble with? Please show an example.

--
Remy Lebeau (TeamB)
Poul Kristensen

Posts: 7
Registered: 9/27/00
Re: From Array[0..50] of Byte to TValue [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 17, 2015 6:44 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Poul wrote:

I receive data on my Android as
Array[0..50] of Char
.
But I cannot convert them to
tValue
.

TValue has a FromArray() method, eg:

type
  TMyArray = array[0..50] of Char;
var
  Arr: TMyArray;
  V: TValue;
begin
  V := TValue.FromArray(TypeInfo(TMyArray), Arr);
end;


Actually, I seem to have general problems converting data from one
char to another - does anyone know of a general description of some
kind?

What exactly are you having trouble with? Please show an example.

--
Remy Lebeau (TeamB)

Thank you very much.
And about me having trouble with character convertions, since this was so straightforward, I think I will try and look into it some more before I give up.

Best regards

Poul
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02