The Daily CLAD

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

Re: Case Structures, Strings and ~ (tilde)

SercoSteveB
Active Participant

What is the value in 'String Value Out' following execution of the VI?

Case Structure Tilde.png

The single hidden case of the Case Structure is shown below.

Case Strucutre Tilde.bmp

a) every equivalent each

b) every equivalent answer allows each available atom

c) each

d) <empty string>

Comments
crossrulz
Knight of NI

A

This is another one that I might consider a little difficult for the CLAD.  Maybe you should submit this one as a CLD-R.


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

A.

But I am assuming that the "~" character comes really late in the ASCII list.  I didn't know off hand.

Aaron M. Baumer
MrStevenUND
Member

A

I spend way too much time when I have to deal with parcing strings.  Too many tricks/qwerks with the regular expressions and special characters. 

RAMESHB
Member

A

mahanteshs
Member

A

Asha_Nagaraj
Member

ans is A

Neelamma
Member

ANS:- A

SercoSteveB
Active Participant

Answer A:  Nice one crossrulz, ambaum01, MrStevenUND, RAMESHB, mahanteshs , Asha_Nagaraj & Neelamma

A textual range syntax for the Case Structure,  might be useful?

mini09
Active Participant

may i know what is the function of ~ in the case structure?

I also go with A...

crossrulz
Knight of NI

~ is just an ASCII character.


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

Ans is A

mini09
Active Participant

why it is used here what is the i don get it? "ea".. "~"

crossrulz
Knight of NI

gnshmrthy wrote:


                       

why it is used here what is the i don get it? "ea".. "~"


                   

What do you not get?  The ".." just creates a range.  The case "ea".."~" will execute for a string that comes between "ea" and "~" using the ASCII values.


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
mini09
Active Participant

My question is what is the string value of ASCII character ~. How the ASCII and the string forms a range?

mini09
Active Participant

My question is what is the string value of ASCII character ~. How the ASCII and the string forms a range?

crossrulz
Knight of NI

The ~ is ASCII character 0x7E (or 126 if you want decimal).  Look up an ASCII table and things will make a lot more sense.


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

PLS EXPLAIN THE SOLUTION OF THIS QUESTION

santoshsss
Member

PLS EXPLAIN THE SOLUTION OF THIS QUESTION

crossrulz
Knight of NI

What part do you not understand?  Reading through the posts, I feel like we explained this decently well.


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

sir, from the beginning, because i am a bit raw in strings used in case structure. pls can u explain me this question step by step. thank you

santoshsss
Member

and also i forgot to mention, i tried this code , but i am getting other output

crossrulz
Knight of NI

You can do a direct comparison of strings with case structure.  So you can have a case "blah".  So when your string is "blah", it will run that case.

What was introduced here is a range of possible strings.  The ".." creates the range.  In this case "ea".."~" creates a range between "ea" and "~".  So alphabetically anything starting with an "ea" or later up to the "~" will run this case.  The comparison is based on the ASCII values of the characters, so make sure you have an ASCII table sitting around.


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

thank you crossrul, do we have to compare the ranges thru ascii values?

crossrulz
Knight of NI

when dealing with strings, it always boils down the the ASCII value.


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