Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Juan Manuel Hernandez del Olmo wrote:
>
> Error: Decimal And Integer.
> When I compile this program, I get this error.
> Any idea?
> Thanks in advance
>
> NCR MP-RAS
> 4GL 7.20
>
> main
> define p_numero Decimal(13,0)
> let p_numero =3D 120000000000
> |________________________^
> |
> | Value exceeds limit of INTEGER precision
> | See error number -1215.
> |
> | The LET statement must have at least one source expression.
> | See error number -4332.
> end main
Yeah when you make an assignment this way 4GL tries to push an integer
and pop it into the decimal (if you are using C4Gl include the -keep
option and look at the generated .ec or .c file). Try this:
define p_numero decimal(13,0), holder decimal(13,0)
let p_numero = 1200
let holder = 10000
let p_numero = p_numero * holder * holder
....
then the arithmetic will be conducted using the decimal library
functions.
Art S. Kagel
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.