From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead 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?

0 Kudos
Message 1 of 12
(5,660 Views)

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,636 Views)

@adekruif wrote:

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
CLD
(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,632 Views)

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. 

0 Kudos
Message 4 of 12
(5,601 Views)

@adekruif wrote:

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
CLD
(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.
0 Kudos
Message 5 of 12
(5,579 Views)

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...

0 Kudos
Message 6 of 12
(5,557 Views)

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.


GCentral
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
0 Kudos
Message 7 of 12
(5,541 Views)

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
0 Kudos
Message 8 of 12
(5,522 Views)

 


@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.

0 Kudos
Message 9 of 12
(5,517 Views)

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
0 Kudos
Message 10 of 12
(5,500 Views)