Leledumbo
Bart
That part I did figure out, problem here was how to get the value 65 from 'A'.
And here's what I came up with:
...
OK := TryStrToInt(Edit1.Text, i) ;
// now we do the work.
IF NOT OK THEN // we have ourself a char.
BEGIN
ii := ORD(Edit1.Text[1]) ;
ListBox.Items.Add(CHR(ii) +'=' +IntToStr(ii)) ;
end
ELSE // we have a number(?hopefully!)
ii := StrToInt(Edit1.Text) ;
...
regards
Jan Magne
I don't understand what are you trying to do... the else part ii := StrToInt(Edit1.Text); is useless because if you come there you have same value in i , in other case if you have more that one char it dosen't work and loose sense for me...
rajivsoft:
Tnx for the replys...
hehe, I can see that.
The App. I'm building is a "template" to show how a program is supposed to work in AutoCad.
So, if you have a termninal bar with 10 terminals, and need to renumber those, this prog. will do it for you. Problem is, they did not put in support for numbering lik (a, b, c, or A1, B1, C1), any combination with prefix & suffix, but numbers only.
So, when I have the letter 'D' in my textbox, the programs the start with D, using a step number=2, and prefix='', suffix[1] to produse this output: (D[1], F[1], H[1]...)
Or any other sequensial output...
But for other purposes, I'm going to try out the code you came up with, for more than one char...
tnx,
Jan Magne