Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. mazkime

    pointer of array-valued functions

    That you for your answer, both showing what I want to do with different methods. salgerman, you understood my problem welle, I wanted to take on any one-dimensional function. I am just surprised I get a segmentation fault if I do not declare f2 and f5 as allocatables. Anyway, by declaring them...
  2. mazkime

    IF statements and comparing character strings

    Comparisons in 'if' statements are made with '==', because '=' is used for assignments. Moreover, when comparing characters, the characters you are comparing to need to be given between quotes (''). The following example works with my computer (gfortran) : program main implicit none...
  3. mazkime

    pointer of array-valued functions

    I had a look on the links you provided, mikrom, but unfortunately they deal with with simple assumed-shape arrays, and not assumed-shape arrays of functions, and are helpless for my case. Let me sum up my problem, for the readers of the forum. I have the code given below. In this code, the...
  4. mazkime

    pointer of array-valued functions

    Thank you for your help. I am going to look at those links and post my answer with, I hope, the solution as soon as possible.
  5. mazkime

    pointer of array-valued functions

    Thank you, this is exactly what I was looking for ! I tried with my own example and it works very well. One last question : to avoid the use of the function overloading with the general interface, I was wondering if it was possible to define, in the interface for the function passed as argument...
  6. mazkime

    pointer of array-valued functions

    You links seem to contain interesting information. I will look at them with great attention and come back later to tell if it works for my case. Thank you !
  7. mazkime

    pointer of array-valued functions

    Thank you for your answers. Here are my comments to all of your recommendations. to Salgerman (post #1): The problem is that I do not to point at a variable, but at a function. Therefore, I cannot declare my pointer with real*8, pointer :: ap(:) What I tried to do is to use the following...
  8. mazkime

    pointer of array-valued functions

    Hello everybody, I am starting this thread because I encounter a problem with the pointers in Fortran. I want to use a pointer of an array-valued function, but I get a segmentation fault error during execution (compilation is ok with gfortran). Everything works well when the pointer aims at a...

Part and Inventory Search

Back
Top