11-16-2014 02:41 PM
i want A program that for each name (string) Give us a decimal number in labview,help me
11-16-2014 02:45 PM
11-16-2014 03:49 PM
if A=0
B=1
C=2
.
.
.
z=27
11-16-2014 04:07 PM
@marii wrote:
if A=0
B=1
C=2
.
.
.
z=27
You are not telling us the "then". The "if" is not sufficient to define the problem.
Is each line a string? Are all lines a single multiline string?
11-16-2014 04:11 PM
What happens in between? There are only 26 letters, and if you start with a=0, then z would be 25. How and where does z jump to 27?
11-16-2014 10:28 PM
Why don't you try doing this yourself? It is not at all clear to me what you want to do, anyway. Have you taken a look at the String functions? Do any of them (particularly the "conversion" functions) look like what you want? Have you tried them?
It would appear that you are trying to learn LabVIEW. The only way to learn a programming language is to write programs -- asking other people to do it for you won't teach you. We will try to answer questions and provide help ...
BS
11-16-2014 11:34 PM
By far the easiest way to do this is to type cast the string (assuming it's an uppercase single letter) to U8 and subtract 65. This is something I would not expect a beginner to know, and it doesn't use any string functions....
Granted, there's some assumptions on my part (uppercase, single letter).
11-17-2014 02:30 AM
I think you are looking for the "String to Byte Array" function.
FROM help: unsigned byte array is the output array. The first byte in the array has the ASCII value of the first character in string, the second byte has the second value, and so on.
So you take your Array and do -65 or -'A' te have a zero=A in your array.
11-19-2014 11:22 AM
The problem is still completey undefined. Here are some possible interpertations.
The quality of our answers cannot be better than the quality of the question. Please define exactly what you have and what you want.
11-19-2014 01:21 PM
i want to use case structure,
Determination the number of letters in the name,
Assign a number to name,
and Vice versa