=?iso-8859-1?Q?Torbj=F6rn?= Karfunkel writes: > 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 It's been a while since I've done any of this stuff. The C "system" function takes a C string, i.e., a pointer to the first character of a string terminated with a null ('\0') character. Is pragma Import smart enough to do the necessary conversion, or do you have to use Interfaces.C.Strings? I would expect that at least you'd have to append the null character explicitly. -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Cxiuj via bazo apartenas ni.