How can I check if a number is integer?
I have a string of characters XXXXXX and I get its length and at the same time I need to convert it and I want to check if it is an integer.
Example:
String ls_cadena = AAAAAA
Integer li_quantidad
li_quantity = len (ls_string)
MOD (li_quantity, 78) = X, how do I validate that the result of this is an integer?
Como yo puedo comprobar si un número es entero?
Tengo una cadena de caracteres XXXXXX y otengo su largo y a la vez necesito devidirlo y yo quiero comprobar si es un entero.
Ejemplo:
String ls_cadena = AAAAAA
Integer li_cantidad
li_cantidad = len(ls_cadena)
MOD(li_cantidad, 78) = X, cómo valido que el resultado de esto es un entero?
thanks and regards,
My intention is determined when the number is integer or decimal.
For example
Integer li_count
li_count =Mod(12,2) -》the result is integer or decimal, how can I check this?
Thank and regards.
However, if non-integer-type datatypes are used in the Mod function, the results will likely not be represented by a whole number.
In that case, depending on the datatypes in question, I might cast/convert both Mod function operands to decimals, perform the Mod, then perform a Mod(x,1.0) [where "x" is the result of the original primary Mod function] and see if that result = 0.0 (decimal). For example:
If Mod(Mod(Dec(var1),Dec(var2)),1.0) = 0.0 Then MessageBox("Congratulations!","It's a whole number.")
HTH