- Joined
- Nov 13, 2006
- Messages
- 1,814
for this example i use hexadecimal but i guess this same to every higher than 10 based numbers:
so i want do this:
have 2 hexadecimal number (but saved in string like: 0A,5F): x, y
have a integer number c
have a string s
question is if i know the s in another function then i am able to know it is c+x+y or only x+y?
both way the 's' stringlength is paired number so 2 or 4 or 6 or 8.
i would check the first character value and convert to number example will be 23 and let say 's' string length was 6, so left theoretical 1st character could be c but same time could be part of the following number too (the hexadecimal string: 'x')
so i am able detect its part of the 'x' or it was 'c'?
so i want do this:
have 2 hexadecimal number (but saved in string like: 0A,5F): x, y
have a integer number c
have a string s
JASS:
x = "*random hexadecimal number like: AF or 045D or 013E45*"
Y = "*random hexadecimal number like: E0 or 31C2 or 205315*"
a = StringLength(x) //could be 1-4
b = StringLength(y) //could be 1-4
//if the 2 hexadecimal number stringlength not same then save a number before the x,y
if a != b then
set c = a*10+b
set s = I2S(c)+x+y
//i dont want write how but 'c' number will be 1 charater only like A=a*2+3=23
else
set s = x + y
//so could be 0A + BC => 0ABC or 0C5432 + 870EAE => 0C5432870EAE
//length is between 1-4
endif
question is if i know the s in another function then i am able to know it is c+x+y or only x+y?
both way the 's' stringlength is paired number so 2 or 4 or 6 or 8.
i would check the first character value and convert to number example will be 23 and let say 's' string length was 6, so left theoretical 1st character could be c but same time could be part of the following number too (the hexadecimal string: 'x')
so i am able detect its part of the 'x' or it was 'c'?
Last edited: