From: Viqar Abbasi <viqar@cae.ca>
Subject: Problems translating C to Ada
Date: 1998/09/01
Date: 1998-09-01T00:00:00+00:00 [thread overview]
Message-ID: <35EC2FA8.3308@cae.ca> (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?
next reply other threads:[~1998-09-01 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-01 0:00 Viqar Abbasi [this message]
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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox