The Daily CLAD

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

回應: CLAD2017 - Fundamentals - String Manipulation 4 of 5

SercoSteveB
Active Participant

What is String Out following execution of the VI?

 

Pick Line.png

 

Pick Line Answers.jpg

Comments
crossrulz
Knight of NI

C


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

C

User002
Not applicable

OK, what am I missing... 😅

 

In the help file for "Pick Line" (interesting function, I've never used it before), it says,

"multi-line string contains one or more substrings separated by linefeeds."

I read this to mean that the delimiter in this function is the Line Feed character (ASCII code 10, or \n), and not the Carriage Return character (ASCII code 13, or \r).

 

However, after playing with the code, it seems that EACH delimiter used by Steve (\r\n*, \n, and \r) results in a new line for "Pick Line" to read.

 

Am I making a mistake while code-tinkering? Is the documentation wrong? (Or perhaps the documentation isn't wrong, just misleading? By saying "linefeeds" instead of "Line Feed characters"?)

 

-joeorbob

 

*I'm on a Windows machine, so the End Of Line Constant for me is "\r\n".

abasak86
Member

Option C. Although, the logic is not totally clear.

skian
Member

C

istan0227
Member

C

skian
Member

C

CA-Pioneer
Member

C. The key of this question is: \r\n, \r, \n those means insert a new line. The pick line just read line to the output string.