LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string to number

Is this a homework assignment?

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 11 of 15
(927 Views)

@billko wrote:

Is this a homework assignment?


Almost definitely.  Otherwise, I can't see a valid use-case for changing A to 1 and vice versa.

 

But, in order to do your homework for you we need to know what you're working with.

 

Is the string always going to be a single character?  Is the character always uppercase/lowercase or can it be either?  What should the program do if the string is longer than a character? Is the same input supposed to take the strings and the numbers to convert or do we want to use a different structure to convert numbers back to letters?  This impacts the data type used for the "number."  In that respect, should the number be output as a string or as a numerical data type?  Does it matter?

 

Repeating the same thing over and over doesn't offer any additional information.  When people are telling you the information you've provided isn't enough to help you do your homework, you need to provide more information.  Otherwise, you're wasting your time and theirs.

0 Kudos
Message 12 of 15
(920 Views)

@marii wrote:

i want A program that for each name (string) Give us a decimal number in labview,help me


Sounds like a perfect place for Variant Attributes!


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
Message 13 of 15
(905 Views)

@marii wrote:

i want to use case structure,

Determination the number of letters in the name,

Assign a number to name,

and Vice versa


Is this now a different problem or are we still talking about the original problem discussed above?

 

Why do you need a case structure? What should the cases be?

Vice versa will problaby not work: If you only know the number of letters in a name, you are unlikely to find the name again.

0 Kudos
Message 14 of 15
(903 Views)

Have you tried an Enum?

Enum Case Structure.jpg

0 Kudos
Message 15 of 15
(866 Views)