NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
rockybooth
Posts: 7
0 Kudos
Accepted Solution

mathscript syntax question

Can any tell me why this does not compile.  I get a red X on the last line, and the variable LampV is shown in red, and is an output.

I seem to have a problem using multiple conditional statements in one script. 

Deleting the last conditional statement removes the error.  The error refers to the last line and says "Line 14, column 1: expecting EOF, found 'end'

 

Thanks

 

if (RadLampV > IrrLampV)
Bench = 'Radiance' ;
CradleT = RadCradT;
LampV = IrrLampV;
LampT = IrrLampT;
else
LampV= RadLampV;
CradleT = RadCradT;
LampT = IrrLampT;
Bench = 'O_Irradiance';
end;
If LampV < 0.1
Bench = 'unknown';
end;

Member
KevinC
Posts: 93

Re: mathscript syntax question

I think your error may be that your second if statement is capitalized. Try replacing "If" with "if".

 

Kevin C.

National Instruments

Member
rockybooth
Posts: 7
0 Kudos

Re: mathscript syntax question

ThanksThat solved it!

 

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page