The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Oh the nostalgia: 2 of 10

SercoSteveB
Active Participant

What are the values of String Out, Boolean Out, Numeric Out and Numeric Array Out following execution of the VI?

NOTE:  The original post "The Daily CLAD" - post number 9, can be found here.  Oh the nostalgia!!

For Loop Iteration Control 14_09_2016.png

a) String Out = "SteveLikesLabVIEW", Boolean Out = TRUE, Numeric Out = 5, Numeric Array Out = {0}

b) String Out = "SteveLikesLabVIEW", Boolean Out = FALSE, Numeric Out = 5, Numeric Array Out = {0,1,2}

c) String Out = <empty string>, Boolean Out = FALSE, Numeric Out = 0, Numeric Array Out = {0}

d) String Out = <empty string>, Boolean Out = FALSE, Numeric Out = 0, Numeric Array Out = <empty array>

Comments
Hirren
Member

D

hemanths
Member

D

crossrulz
Knight of NI

D


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
vnkat62
Member

D

nik35324
Member

D

Matt-A.
Member

D

NoraAmer
Member

D

LabVIEW sets the count terminal to the smallest value of the count terminal (here is 5) and input array sizes wired to the auto-indexed tunnels (here are 0 and 3) thus the smallest value of these (5, 0, 3) is 0 so the For loop will iterate zero times and will keep default values to its output tunnels

The default values for the data types here are

String = <empty string>

Boolean = FALSE

Numeric = 0

Array = <empty array>

vinodrathode
Member

Its D obviously. The loop count terminal is '0'

MrStevenUND
Member

D

Sonti_11532
Member

Answer is "D"

SercoSteveB
Active Participant

Answer: D.  Nice one all. 

 

The loop does not iterate, as controlled by the auto-indexing input tunnel connected to the smaller of the two arrays (the empty array).  LabVIEW has to create values for the output tunnels of the FOR Loop and goes for the default values.

levonsg
Member

D

https://images.youracclaim.com/size/340x340/images/2edb5b1a-9414-44e1-8519-c774fc6dd079/36015_Certificate_Badges_FINAL__1__NI_Instructor_v5.png