# LabVIEW

cancel
Showing results for
Did you mean:

## CLAD Question: Case structure Accepting Doubles

I am studying for the CLAD, and on a practice exam came across this question.

30. You can use all of the following data types as inputs to the case selector terminal except:

A. Doubles

B. Enumerated type values

C. Strings

D. Integers

LabVIEW coerces the double into an integer, so aren't all answers technically correct?

The answer they are looking for is "A", because as I understand it a case structure doesn't actually handle a double since it gets coerced into an integer. Am I correct in this thought process?

Message 1 of 12
(5,653 Views)

## Re: CLAD Question: Case structure Accepting Doubles

I agree, the question does not have the best wording. In fact, if a VI had a variant input and someone asked "what data type can you use as an input?" I would say anything, even though it's coercing to a variant.

That said, it's definitely not good practice to use a double, and your cases cannot be defined by doubles (you can't have a case called "1.5" for instance).

Message 2 of 12
(5,629 Views)

## Re: CLAD Question: Case structure Accepting Doubles

I am studying for the CLAD, and on a practice exam came across this question.

30. You can use all of the following data types as inputs to the case selector terminal except:

A. Doubles

B. Enumerated type values

C. Strings

D. Integers

LabVIEW coerces the double into an integer, so aren't all answers technically correct?

The answer they are looking for is "A", because as I understand it a case structure doesn't actually handle a double since it gets coerced into an integer. Am I correct in this thought process?

I think you nailed it.

Bill

(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 3 of 12
(5,625 Views)

## Re: CLAD Question: Case structure Accepting Doubles

Ok, thank you for confirming my suspicions.

IMO It would definitely be a better written question if it asked which data type gets coerced, rather than which one cannot be used. I feel that shows more LabVIEW knowledge than the original question.

Message 4 of 12
(5,594 Views)

## Re: CLAD Question: Case structure Accepting Doubles

Ok, thank you for confirming my suspicions.

IMO It would definitely be a better written question if it asked which data type gets coerced, rather than which one cannot be used. I feel that shows more LabVIEW knowledge than the original question.

Or maybe something like, "Which one should not be used...?" because we know they all could be used.

Bill

(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 5 of 12
(5,572 Views)

## Re: CLAD Question: Case structure Accepting Doubles

Well, you can wire it, but it won't be used.

CLAD is very easy if you just done core 1. You know (been told) what they want to here.

CLAD is actually harder to pass with some experience, since you can tell they are wrong, but don't know how to fix it.

Then CLAD gets easier again, since you know how they are wrong, and you know what they expect.

A lot of questions are simply wrong. Often because newer versions have changed implementations. Like "will a property node force keeping the FB in an executable"? It used to, but when they start accepting references, this is not true anymore.

Then there are questions that I don't even know for sure when asked (but I do it right on intuition). What's the row input of an index array and what is the column index? Don't really care. Run the VI and switch when it's wrong.

They are working on it. It's not as easy as it sounds to come up with good questions. I think you can get CLA renewal point by making CLAD questions, so I guess every CLA can make a change...

Message 6 of 12
(5,550 Views)

## Re: CLAD Question: Case structure Accepting Doubles

Also know that the practice exams often contain "rejected" questions (wording is weird but cannot come up with something better, too difficult, too many opinions on the matter, etc).  I know the CLED practice exam is nothing but rejected questions.  I would assume the new CLAD practice will follow suite.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 12
(5,534 Views)

## Re: CLAD Question: Case structure Accepting Doubles

wiebe@CARYA wrote:

They are working on it. It's not as easy as it sounds to come up with good questions. I think you can get CLA renewal point by making CLAD questions, so I guess every CLA can make a change...

You can also get points for developing a CLD exam. That is not a trivial task. I wrote the vending machine exam.

Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 8 of 12
(5,515 Views)

## Re: CLAD Question: Case structure Accepting Doubles

@Mark_Yedinak wrote:

wiebe@CARYA wrote:

They are working on it. It's not as easy as it sounds to come up with good questions. I think you can get CLA renewal point by making CLAD questions, so I guess every CLA can make a change...

You can also get points for developing a CLD exam. That is not a trivial task. I wrote the vending machine exam.

I know, but seemed OT. It sure would be more fun and rewarding to do. But I'm sure it is a lot of work, as in several days I imagine. There's a lot more to it that you'd think.

Did the cld twice (let my first class expire). Pretty sure one of them was the vending machine. The exams are all ok, but the example solutions are terrible.

One of the things that bothers me is the requirement that you have to use a type def enum based state machine. So I can't use a OO state pattern? Ridiculous!

I might try a cld exam one day, just to make a mark. Don't need the points, got all of them within a 1.5 year (2 NI days presentation, class summit, done). I was kinda surprised you can actually get recertification points for doing an online course. Recertify class by doing cld prep course. Weird.

Message 9 of 12
(5,510 Views)

## Re: CLAD Question: Case structure Accepting Doubles

wiebe@CARYA wrote:

....

One of the things that bothers me is the requirement that you have to use a type def enum based state machine. So I can't use a OO state pattern? Ridiculous!

...

The last time I did the CLA I first implemented it using a state machine but hen it hit me that I could use a Factory pattern.

Spoiler
I believe it may have been one of the first LVOOP version of the CLA exam.

So I wrote it again using a Factory pattern and they passed me.

Spoiler
Hoping I can retire before I have to take that exam again.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 10 of 12
(5,493 Views)