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
 All Forums
 Origin Forum
 Origin Forum
 if then loop compiling error

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
GiuliaF Posted - 03/29/2012 : 04:42:49 AM
Origin Ver. 8.1 and if then loop;
Operating System: Windows

Hallo i am newy in origin, i am trying to elaborate some data:
i want to corrected some radiance temperature with emissivity values,
i have got 2 formula one if solid T>1630K one if liquid; and i am using if then loop
is this ok?? it gives me a compiling erro on declaration variables!!

// Declare ranges for columns A and B
range ra = col(C);
range rb = col(B);
// Fix the test value "Melting Radiance Temperature"
vtest = 1630;
// if then loop
loop(row,1,ra.GetSize())
{
if(ra[row] > vtest) rb[row] = 1/(1/ra[row]+0.65856/14388.6*ln(0.333+8.275E-6*ra[row]);
else rb[row] = 1/(1/ra[row]+0.65856/14388.6*ln(0.48727-1.97327E-5*ra[row]);
}

Best Regards
Fidelma
3   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 03/30/2012 : 09:45:31 AM
Hi Fidelma,

Your code is of LabTalk script, so you don't need to compile, and you can run as is given by the LabTalk interpreter. You can copy-and-paste to the Script window("Window: Script Window" menu), highlight all lines, and press ENTER key to run; Or you can put your script in a script file(.OGS), and run by various way. Please consult to the following page (or its counterpart in the LabTalk help) for the details:

http://wiki.originlab.com/~originla/ltwiki/index.php?title=Category:LT_Running_Scripts

Hope this makes sense.

--Hideo Fujii
OriginLab
GiuliaF Posted - 03/30/2012 : 02:56:21 AM
Thank you very much
i have correct it this way :


range ra = col(C);
range rb = col(B);
// Fix the test value "Melting Radiance Temperature"
vtest = 1630;
// if then loop
loop(row,1,ra.GetSize())
{
if(ra[row] > vtest) rb[row] = 1/(1/ra[row]+0.65856/14388.6*ln(0.333+8.275E-6*ra[row]));
else rb[row] = 1/(1/ra[row]+0.65856/14388.6*ln(0.48727-1.97327E-5*ra[row]));
}

But it is giving me the same this error:

Error, syntax error in variable declaration.

Compiling errors found, linking cannot start!

The error is signed on the line of( range ra=....)



quote:
Originally posted by Hideo Fujii

Hi Fidelma,

It seems the following two lines don't have the matching parenthesis ')':

1/(1/ra[row]+0.65856/14388.6*ln(0.333+8.275E-6*ra[row]);

and

1/(1/ra[row]+0.65856/14388.6*ln(0.48727-1.97327E-5*ra[row]);

--Hideo Fujii
OriginLab

Hideo Fujii Posted - 03/29/2012 : 09:22:08 AM
Hi Fidelma,

It seems the following two lines don't have the matching parenthesis ')':

1/(1/ra[row]+0.65856/14388.6*ln(0.333+8.275E-6*ra[row]);

and

1/(1/ra[row]+0.65856/14388.6*ln(0.48727-1.97327E-5*ra[row]);

--Hideo Fujii
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000