Skip to content

Instantly share code, notes, and snippets.

@kjseefried
Created July 15, 2014 00:41
Show Gist options
  • Save kjseefried/32815c65dc88b106deed to your computer and use it in GitHub Desktop.
Save kjseefried/32815c65dc88b106deed to your computer and use it in GitHub Desktop.
Example to convert an ada vector to a c vector
type Index is range 1 .. 3;
type Ada_Vector is array (Index) of Float;
type C_Vector is array (Index) of C_Float;
function To_C (Item : in Ada_Vector) return C_Vector is
begin
return Result : C_Vector do
for I in Index loop
Result (I) := C_Float (Item (I));
end loop;
end return;
end To_C;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment