freelanceprogrammers.org Forum Index » Delphi

how to cast string cotains #0 to variant by VarPythonCreate?


View user's profile Post To page top
princeofdata... Posted: Fri Jul 21, 2006 12:21 am


Joined: 21 Jul 2006

Posts: 2
how to cast string cotains #0 to variant by VarPythonCreate?
Hi:

I write a demo, but cannot get the correct result.

-------------------
procedure Test;
var
s: string;
v: variant;
begin
s := #1#2#3#0#0#4; //length(s) is 6
v := VarPythonCreate(s);
showmessage(intotostr(len(v))); //result is 3
end;
-----------------------

chars after first #0 missed in cast!
I don`t know how to resovle this trouble.
I need your help.
thanks for any reply.

Samuel Chi
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help