(9830) C, Fortran and String Descriptors?

Archive of the OpenVMS Ask the Wizard (ATW) questions and answers database.
Locked

Topic author
User
Visitor
Posts: 0
Joined: Mon Jan 10, 2022 8:16 am
Reputation: 0
Status: Offline

(9830) C, Fortran and String Descriptors?

Post by User » Wed Sep 08, 2004 9:26 am

I am writing a C program that needs to accept Fortran strings. I know how to
use descriptors to pass strings from C to Fortran, but I'm having trouble
finding documentation to help me do it the other way. Thanks for your help!


Wizard
Visitor
Posts: 0
Joined: Mon Jan 10, 2022 8:17 am
Reputation: 0
Status: Offline

Re: (9830) C, Fortran and String Descriptors?

Post by Wizard » Thu Sep 09, 2004 9:26 am

OpenVMS descriptors are the same, regardless of the languages that
are involved.

There are a number of different descriptors available, of course,
and the selection depends on the language and the data involved.

The OpenVMS Calling Standard, the Guide to Modular Programming,
and the Programming Concepts manuals are the related manuals.

If you need details of a particular implementation of a particular
descriptor-based argument-passing mechanism, code two programs in
the same language that use the desired calling interface, and then
use the debugger and the OpenVMS programming documentation to examine
and to decode the descriptors and the details; use the debugger and
the coded examples to evalate the details of the calling standard
as applied to the particular language and debugger.

In general, a string descriptor is used for most strings. Examples
of string descriptors abound, both here in Ask The Wizard and in
the Natural Language Search Assistant (formerly AskQ) website. See
OpenVMS FAQ for additional C programming information and a brief
introduction to the descriptor, and for pointers to AskQ. See topic
(1661) for some related programming information, and particularly
for common coding errors.

Locked