Is it possible to increase the size of an already allocated array in FORTRAN, with out reallocation?(adsbygoogle = window.adsbygoogle || []).push({});

e.g. if in start A(3)=[4, 5, 6] and now I want something like A(4)=[4, 5, 6, 7].

Currently I am using a temporary array to do this

allocate(A(3))

A=(/4, 5, 6/)

allocate(temp(3))

temp=A

deallocate(A)

allocate(A(4))

A(1:3)=temp

A(4)=7

Or some other suggestion

Zahur

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fortran Help

Loading...

Similar Threads for Fortran Help |
---|

Fortran Successive Over Relaxation Method in FORTRAN |

If statement for Monte Carlo integration |

C/++/# How to use C++ in studying calculus |

Fortran How to buy Fortran Programming Software Commersial License |

Fortran Fortran for Computational Fluid Dynamics Problems |

**Physics Forums | Science Articles, Homework Help, Discussion**