From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,b722912089e5013d X-Google-Attributes: gid1164f8,public From: hoffman@xdelta.zko.dec.nospam (Hoff Hoffman) Subject: Re: system command Date: 2000/11/16 Message-ID: <8v1bmd$rfh$5@mailint03.im.hou.compaq.com>#1/1 X-Deja-AN: 694435142 Distribution: world References: <3A101BEC.95888D33@lbl.gov> X-Complaints-To: usenet@mailint03.im.hou.compaq.com X-Trace: mailint03.im.hou.compaq.com 974402061 28145 16.32.80.251 (16 Nov 2000 19:14:21 GMT) Organization: Compaq Computer Corporation Reply-To: hoffman@xdelta.zko.dec.nospam NNTP-Posting-Date: 16 Nov 2000 19:14:21 GMT Newsgroups: comp.sys.dec In article <3A101BEC.95888D33@lbl.gov>, Tobias Funk writes: :We are using a alpha machine with VMS 6.2. I am writing a fortran :program and trying to use a system command. I know that you can do this :wit fortran under unix with the following command: :value=system("command"). Is there something comparable under VMS? Please use the lib$spawn call, it will be easier and more flexible. Fortran and C code can be intermixed and you can call system (decc$system, since Fortran doesn't add the prefix for you) from Fortran, but C and Fortran have differing assumptions around default argument passing. C assumes ASCIZ strings, while Fortran assumes ASCID strings. This means that you would have to create C-format strings in Fortran... I'll ask that the response to the version of this question posed over in the Ask The Wizard area be cancelled. --------------------------- pure personal opinion --------------------------- Hoff (Stephen) Hoffman OpenVMS Engineering hoffman#xdelta.zko.dec.com