Value does not calculate.
"James B. Byrne via Aubit4gl-discuss" <[email protected]> Fri, 12 Mar 2021 12:11:15 -0500
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <[email protected]> |
The previous message had a subject which did not relate to message contents.
SOrry about that.
On Fri, March 12, 2021 11:22, James B. Byrne wrote:
>
> Code
>
> LET ga_items[curr_pa].total_price = ga_items[curr_pa].quantity
> * ga_items[curr_pa].unit_price
> DISPLAY ga_items[curr_pa].total_price to sa_items[curr_sa].total_price
>
> DISPLAY ga_items[curr_pa].quantity, " * ",
> ga_items[curr_pa].unit_price, " = ",
> ga_items[curr_pa].total_price
> SLEEP 5
>
> What is shown in display
>
> 1 * 250.0000 =
>
> What is wrong with the calculation such that ga_items[curr_pa].total_price has
> no value?
>
>
The problem I discovered was this:
DEFINE ga_items ARRAY[10] OF
RECORD
. . .
total_price LIKE items.total_price
END RECORD
In the stores7 sample database items.total_price has TYPE MONEY. Changing this
to total_price DECIMAL(16,4) fixed the issue.
--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Unencrypted messages have no legal claim to privacy
Do NOT open attachments nor follow links sent by e-Mail
James B. Byrne mailto:[email protected]
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Unencrypted messages have no legal claim to privacy
Do NOT open attachments nor follow links sent by e-Mail
James B. Byrne mailto:[email protected]
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3