Wolfgang Schölmberger
Member
Hi everybody,
I have the following code that I should translate to ABL. The first 2 lines are easy, but i'm stuggeling with the last 2 lines.
int length = base64String.Length;
while (length > 0 && base64String[length - 1] == '=')
--length;
char[] chArray = new char[length + 1];
chArray[length] = (char)(48 + base64String.Length - length);
I came up with this solution, but i'm not sure if it is ok:
DEF VAR chArray as CHAR.
SUBSTR(chArray, length, 1) = CHR(48 + LENGTH(base64String) - length).
and if this is ok, then I don't understand what they are doing.
TIA, Wolf
I have the following code that I should translate to ABL. The first 2 lines are easy, but i'm stuggeling with the last 2 lines.
int length = base64String.Length;
while (length > 0 && base64String[length - 1] == '=')
--length;
char[] chArray = new char[length + 1];
chArray[length] = (char)(48 + base64String.Length - length);
I came up with this solution, but i'm not sure if it is ok:
DEF VAR chArray as CHAR.
SUBSTR(chArray, length, 1) = CHR(48 + LENGTH(base64String) - length).
and if this is ok, then I don't understand what they are doing.
TIA, Wolf