Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
hotelbravo
Posted - 12/28/2007 : 1:24:27 PM Hello everybody,
can somebody please help me with following problem:
I just want to convert a string, which contains some numbers, to an integer or double.
I'm afraid, but I do not know how to manage this. I've already searched in the help and in this forum, but results were negative...
Thanks to all who help me!
3 L A T E S T R E P L I E S (Newest First)
cpyang
Posted - 01/02/2008 : 1:59:55 PM LabTalk assignment will directly convert literal string into value. So basically it is a matter of how to convert a LT string variable into a literal, which can be done by the %( ) substitution, see below:
string a$=100;int b=%(a$);b=;
CP
hotelbravo
Posted - 01/02/2008 : 12:52:13 PM oh sorry, I am programming in Labtalk, not in Origin C. Is therefore any command to convert a string to int or double?
for example: string a = 100 should be convert to integer
cpyang
Posted - 12/28/2007 : 2:41:04 PM I assume you are talking about Origin C?