4.1 4gl won't compile some 4.0 code
Posted in 1992
Greetings - I am forwarding this for a co-worker who does not have access to this list. If you wish to reply directly, email him at: zing@hpbs2560.boi.hp.com Thanks in advance. ****** BEGINNING OF INCLUDED MESSAGE ******************************** Some of the 4gl code seems to be having problems compiling under 4.1. Here is an example that I haven't gotten fixed... Any help would be appreciated: Form file: jnk.per database formonly screen { -[s0 ]----------------< BATCH FAIL ENTRY >--------[f2 ]- Barcodes: Barcodes: Barcodes: Barcodes: [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] [f9 ] ---------------------------[f20] barcodes entered ---------------------<fail>- } end attributes s0 = formonly.station,reverse,noentry; f9 = formonly.barcode,upshift,reverse,picture = "XXXXXXXXXXXXXXXX", comments = "Please enter barcode"; f2 = formonly.operator,noentry; f20 = formonly.array_size,reverse,noentry; end instructions screen record barcodes[32] (formonly.barcode) end 4gl file that won't compile: jnk1.4gl database sentinel main { --------------- } { local variables } { --------------- } define barcode_in array[320] of record barcode like bc_serial.barcode end record define curr_row integer, assembly like component.component_name, revision like component.component_rev open form batch_scan from "jnk" display form batch_scan call set_count(300) input array barcode_in from barcodes.* after field barcode let curr_row = arr_curr() display barcode_in[curr_row].barcode select @component_name, @component_rev into assembly, revision from component where @component_id = assembly_id end input end main The 4gl compiles to ec fine. The ec compiles to c fine. The c doesn't compile, I get the following message: "jnk1.c", line 268: number of initializers exceeds array size for '_sqobind' The line looks like it is part of the select statement, but if the select statement is moved before the 'input array' statement it compiles fine. Other code has the same problem, all with a select statement inside of an 'input array'. ****** END OF INCLUDED MESSAGE ********************************************** -- - eko __ | | | | ___________________________________________________________ | \\ | | | \\ | Ellen K. Osinski | | | | Hewlett-Packard | \\ \\ | Boise Site Operations - Boise Surface Mount Center | / \\ | 11413 Chinden Blvd | | ---/\\ | Boise, ID 83714-1023 | | | | | | | | phone : (208) 323-4904 | | * | | e-mail: ellen@hpbs2571.boi.hp.com | | | | telnet: 1-323-4904 | |___________| |___________________________________________________________|