Re: Is this a bug in 4GL 4.10?
Posted in 1992
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration
In article <1992May18.204436.4282@mips.mitek.com>, jmaddox@dbaix.oc.com (John Maddox) writes: |> |> Thought I'd bounce this question around the net and see what comments |> it generates..... |> |> Consider this 4gl program: |> |> MAIN |> |> DEFINE a ARRAY[10] OF INTEGER, |> b ARRAY[10] OF INTEGER, |> c INTEGER |> |> |> FOR c = 1 TO 10 |> |> LET a[c] = b[c] = 0 |> |> END FOR |> |> FOR c = 1 TO 10 |> |> DISPLAY c, " ", a[c], " ", b[c] |> |> END FOR |> END MAIN |> |> |> |> When you run this program, these are the results: |> |> Script started on Mon May 18 15:41:02 1992 |> $ fglgo junk |> 1 1 0 |> 2 1 0 |> 3 1 0 |> 4 1 0 |> 5 1 0 |> 6 1 0 |> 7 1 0 |> 8 1 0 |> 9 1 0 |> 10 1 0 |> |> script done on Mon May 18 15:41:10 1992 |> |> |> Is this the result I should expect? Or is this a bug? |> This 4gl (4.10.UD2) is running on a RS/6000 (AIX 3.1) |> |> Email please, I rarely get to read this group.... thanks |> -- |> ================================================================================ |> John Maddox (jmaddox@dbaix.oc.com) * OpenConnect Systems * Tel: 214-490-4090 It is not a bug. The statement: LET a[c] = b[c] = 0 can be viewed like this: LET a[c] = ( b[c] = 0 ) Since the right hand side of LET is always 1, a[c] is always 1. You're thinking like a C person. Ain't it grand? -- --- / . . \\ | - | \\ \\_/ / --- ------------------------------------------------------------------------------ John R. Carter, Sr. Programmer/Analyst - Informix DBA Computer Sciences Corporation jcarter@nas.nasa.gov Numerical Aerodynamic Simulation 415/604-3662 NASA Ames Research Center, Moffett Field, CA 94035-1000 M/S 258-6 ------------------------------------------------------------------------------