Accessing 'pragmas' in FORTRAN programs? 
Author Message
 Accessing 'pragmas' in FORTRAN programs?

According to the 'man' pages on my local machine (Sparc 3), it is
possible to access C Library functions through the use of 'pragmas'.
I know a little about C and I have a reference book (Kernigan and
Ritchie) which defines them as follows:

  PRAGMAS:  A control line of the form

     # pragma <token-sequence(opt)>

  causes the processor to perform an implementation-dependent
  action.  An unrecognized pragma is ignored.

How does one call a 'pragma' in a fortran 77 program?

                                Thanks,
                                   Eva S. Simmons
--
***THE SIMMONS FACTOR ****EVA SABRINA SIMMONS******UT-AUSTIN GRAD STUDENT*****

         WWW Personal Page:   http://www.*-*-*.com/ ~weevey
****************** WATCH IT, OR IT MIGHT ATTACK!! ****************************



Wed, 27 Aug 1997 12:15:10 GMT  
 Accessing 'pragmas' in FORTRAN programs?


   How does one call a 'pragma' in a FORTRAN 77 program?

You don't. You use the C$PRAGMA C in a Fortran program to change the
name handling (case becomes significant, the trailing underscore is
removed etc.).

See the FORTRAN Reference Guide for details.
--
----------------------------------------------------------------

SunSoft Developer Products               |
 2550 Garcia MTV 12-40                   | (415 336 2648) fax 964 0946
Mountain View, CA 94043  <speaking for myself, not Sun*> Copyright 1995



Sat, 30 Aug 1997 01:51:49 GMT  
 Accessing 'pragmas' in FORTRAN programs?


Quote:
>According to the 'man' pages on my local machine (Sparc 3), it is
>possible to access C Library functions through the use of 'pragmas'.
>I know a little about C and I have a reference book (Kernigan and
>Ritchie) which defines them as follows:

[C-specific definition deleted]

Quote:
>How does one call a 'pragma' in a FORTRAN 77 program?

The answer is compiler-dependent. Some will expect a line that begins

on. Many don't support pragmas at all. (Does g77?) Most compilers (not
just F77, but Pascal compilers too) embed pragmas inside comments, so
that they'll only be noticed by the compiler they are intended for.
A few languages (ANSI C? and certainly Ada) explicitly provide for
pragmas in the language definition. Fortran does not (yet) do so.

Incidentally, what do you mean by a "Sparc 3"? I haven't heard of such
a beast. (I do know the Sun 3 range of machines, but they were based
on Motorola CPUs, not on Sparcs.)

--



Sun, 31 Aug 1997 18:10:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. socket access from 'C' program

2. Converting 'C' programs to Fortran

3. Converting a 'C' program to Fortran

4. Wanted: Fortran 'pretty print' program

5. Wah Wah's Most Frequent Fortran Fallacy : how to call other program by compaq fortran

6. adding program to windows 'programs' menu

7. Subverting 'Access for Sub-programs

8. Accessing 'DIM'ed group variables

9. 'C' Access to NTX files

10. Accessing 'non-file' WPS objects

11. accessing top-level 'self'

12. Access to T'Class vs T'Class as parameter to subprogram

 

 
Powered by phpBB® Forum Software