Note that there are some explanatory texts on larger screens.

plurals
  1. POFortran Pointer arithmetic
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. CONot sure what you are trying to do, but in languages like c that allow pointer arithmetic the arithmetic is only addition/subraction. The "arithmetic" operates on memory address, so that `pointertoa + 1` yields a pointer to whatever is in the next memory loc after a. I dont think this is possilbe in fortran, but in any case your multiplication makes no sense.
      singulars
    2. COThanks for making the arithemtic clear. What I try to do is the following. I have a program depending on many input variables, and on of them is going o be changed inside of a do loop. But it depends on the input, which one is changed. However the loop construction is always the same and the parameters are stored in modules to be available in plenty of subroutines. Now I want to write some case construct after the parameter reading part to tell for the rest of the program which one is the parameter to be varied inside the loop, and in the loop I have a placeholder (here a).
      singulars
    3. COEverything would work perfectly, if the placeholder would follow the same expression for each parameter. Unfortunately it doesn't. Of course I can write an if clause to each point, where it is used, but a single decision point at the beginning of the program looks nicer, is more controlled (in the sence of errors done by myself or people who have to use the code in the future) and it's faster by means of calculation time. Sorry for the long answer, but you asked what I'm trying to do.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload