The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 integer to string problem??
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

5*10

Germany
Posts

Posted - 09/23/2005 :  11:01:42 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7G SR4 v.7.0552
Operating System: win2k

Hi,

just a short question

I run my OriginC function on different Computer,(don't panic all legal) but all have the same Operating System and the same Origin Version. But on the one Computer the convertion from integer variable to string variable works fine. On the other it doesn't work and i get strange signs like , $, % but not the numbers i like to have like 36... .
The methode I transform it is like this:

int i1 = 36;
string str1=i1;
out_str(str1);

Greets 5*10

peter.cook

UK
356 Posts

Posted - 09/23/2005 :  11:16:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Try eg
out_int("",i1) 

or
out_int("integer value is ",i1) 


Cheers,

Pete

Go to Top of Page

5*10

Germany
Posts

Posted - 09/25/2005 :  12:44:29 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Pete,
thank you for your answer, but that is not the problem. I want to label the integer value in an automatically build graph. The label is like:
Temperatur: 36C
and the 36 is e.g.the integer value. By now, I do this by convert the integer value to a string value an label it with the Labtalk label command. And on the one computer it works and on the other it do not.
So what I want to know is, if it is an accident that it works on the one machine but not on the others!
And if it is, is there I correct way to solve this problem!
Hope someone kann help me!!

Greet 5*10

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 09/25/2005 :  1:01:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Does the machine on which your labelling fails also have 7.0 SR4? The ability to insert an integer directly into a string like you are doing might have been introduced in a service release. (Not sure about that.) In any case, this should work in all versions of Origin...

int i1 = 36;
string str1;
str1.Format("Temperatur: %dC",i1);
out_str(str1);

Mike Buess
Origin WebRing Member
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000