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
 enter a variable
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

hlchlore

France
Posts

Posted - 08/11/2006 :  10:00:01 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi every body!!

I seek to know how to write a script who allows me to post a question concerning the value of a variable and to seize then the entered variable .


Mike Buess

USA
3037 Posts

Posted - 08/11/2006 :  10:25:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In Origin 7.5 you can use Function: GetNBox...

#include <GetNBox.h>
double Value;
void run_GetNbox()
{
GETN_BOX(tr)
GETN_NUM(val, "Value", Value)
if(GetNBox(tr, "Enter a Value", NULL))
{
Value = tr.val.dVal;
printf("The value %g was entered.", Value);
}
}


Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 08/11/2006 10:26:23 AM
Go to Top of Page

hlchlore

France
Posts

Posted - 08/14/2006 :  04:27:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot,

But i'd copy this script in my script window and
it said me that there is an error.
Can you explain me the difference between origin C program
and labtalk program
Go to Top of Page

Deanna

China
Posts

Posted - 08/14/2006 :  04:46:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, hlchlore.

What Mike has written for you is an Origin C program instead of a Labtalk script. You should use the Code Builder to compile it before executing. There is a chapter in the programming help file with the title of Code Builder User's Guide. You may refer to it if you need any help with the use of the Code Builder.

I would say that the most prominent difference between Origin C and Labtalk is that Origin C is a compiled language while Labtalk is a scripting language. You can use Labtalk scripts without compiling, while compiling is a MUST before running an Origin C program. There is a chapter titled LabTalk vs Origin C in the programming help file. You may take a look at it if you are interested.


Deanna
OriginLab GZ Office
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