function block calculation module

15 pts.
Tags:
Calculating fields
VBScript Functions
VBScript Statements
Visual Basic
Visual Basic Script
Hello,

I would like to know how to read this code and what the outcome would be. its writtin in a calculation function block which typically includes IF-THEN-ELSE, DO-WHILE, etc. statements.

out1 := (in2 = 0) ? 0 : ((in1 & in3) > 0);

of course in1/2/3 are the inputs, out1 is the output. Is this a type of IF-THEN-ELSE short-hand?

Thank you;

ASKED: October 15, 2011  12:07 AM
UPDATED: October 17, 2011  8:08 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Is this a type of IF-THEN-ELSE short-hand? It seems likely to mean something like:
    if (in2 = 0) then out1 = 0 else out1 = ((in1 & in3) > 0) ;
    But it's hard to tell because you haven't told us what language it is written in. Tom
    125,585 pointsBadges:
    report
  • Mkemaleddine
    I was able to play with the software. It is a simple ST (Structured Text) code. once I tested a few IO it was obvious that it is indeed an IF-THEN-ELSE structure, known as "?:" operator. TomLiotta thanks for your reply. your presumption was correct.
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following