comp.lang.ada
 help / color / mirror / Atom feed
* Problems translating C to Ada
@ 1998-09-01  0:00 Viqar Abbasi
  1998-09-01  0:00 ` Trailing Underscores (was Re: Problems translating C to Ada) Robert I. Eachus
       [not found] ` <35ED511D.2C4A2038@boeing.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Viqar Abbasi @ 1998-09-01  0:00 UTC (permalink / raw)


Hi there,

I've been using CBIND revision 4 to translate tiny (one page)
C programs into Ada.  I recently noticed a problem that the
CBIND program incorrectly translates matrices.  For example,
in the C file:

 float          my_matrix[3][3];

becomes in Ada:

    type vector_of_c_float_t is
        array(integer range <>)
        of c.float;

    type matrix_of_c_float_t is                              
        array(integer range <>)
        of vector_of_c_float_t(0..2);

    my_matrix: matrix_of_c_float_t(0..2)(0..2);

The problem is with the final line, which should be:
    my_matrix: matrix_of_c_float_t(0..2);

Does anyone know if there is a newer version of CBIND 
out there which corrects this problem.  Or, do you 
recommend I use the "c2ada" tool to fix this problem?
My translations are really small, so I'd rather use
CBIND if I can.  

Thanks!
Viqar

Recently gained Ada experience:  
Ada9X RM and GNAT 3.09 do not allow underscores at the 
end of a procedure / function / variable name.  Why not?




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-09-03  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-01  0:00 Problems translating C to Ada Viqar Abbasi
1998-09-01  0:00 ` Trailing Underscores (was Re: Problems translating C to Ada) Robert I. Eachus
1998-09-03  0:00   ` Samuel Mize
     [not found] ` <35ED511D.2C4A2038@boeing.com>
1998-09-02  0:00   ` Problems translating C to Ada Ronald Ali

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox