Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WITH Interfaces.C ; USE Interfaces.C ;
- PROCEDURE main IS
- PRAGMA Linker_Options("hello_world.o") ;
- TYPE T_Type IS RECORD
- N : Int ;
- Nom : Char_Array(0..5) ;
- END RECORD ;
- PRAGMA Convention(C,T_Type) ;
- PROCEDURE Hello_World_Ada(X: access t_type) ;
- PRAGMA Import(Convention => C,
- Entity => Hello_World_Ada,
- External_Name => "HelloWorld") ;
- X : aliased T_Type ;
- BEGIN
- X.N := 4 ;
- X.Nom := To_C("Bobba") ;
- Hello_World_Ada(x'access) ;
- END main ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement