While I'm not familiar with a C_System function, if is in written in C, you most likely should be passing a C string: function C_System(value : Interfaces.C.Char_Array) return integer; pragma Import( C, C_System, "system"); result : integer; begin result := C_System( Interfaces.C.To_C( "pwd " ) ); result := C_System( Interfaces.C.To_C( "acdsee D:\work\pictures\BP47.jpg" ) ); end Command; This turns the Ada string, which includes information about the extent of the string, into a null terminated string. Other answers to questions: You may import functions or procedures. Passing file handles from Ada to C may be tricky. If you use the File_Type defined in Ada's standard libraries, the definition is implementation dependent. You can certainly interface to C functions for doing all I/O in Ada, but I don't know if you can mix Ada and C's native file handling. I hope this helps, SteveD "Torbj�rn Karfunkel" wrote in message news:mailman.989509930.7705.comp.lang.ada@ada.eu.org... > Using the pragma Import method of calling non-Ada entities, am I only > allowed to define functions? How about procedures? What I want to do is > to create a text file, give this text file as a parameter to a C > program, and then wait until the C program finishes. By then it will > have produced another text file that I want to use. > Can I use a dummy result variable like the 'result' in the following > (from another mail): > > procedure Command is > > function C_System(value : String) return integer; > pragma Import( > C, C_System, "system"); > > result : integer; > begin > result := C_System("pwd "); > result := C_System(value => "acdsee D:\work\pictures\BP47.jpg "); > end Command; > > /Torbj�rn Karfunkel > > >