passing an allocatable matrix in a subroutine to the main program

From: joel GUERRERO (joegi.geo_at_yahoo.com)
Date: 07/31/04


Date: 30 Jul 2004 18:29:44 -0700

Can anybody help me with this.
I need to pass an allocatable matrix in a subroutine to the main
program or to another subroutine. How can I do?
I always get an error that I cannot do this.

:\MSDEV\Mis proyectos\allocate\readmesh.f90(10): error FOR3435: symbol
XC is a dummy argument - cannot be ALLOCATABLE detected between XC and
,
Error executing fl32.exe.
allocate.exe - 1 error(s), 0 warning(s)



Relevant Pages

  • Re: using optional arguments not present (bug)
    ... an attribute for an optional dummy argument that makes the dummy ... end subroutine sub ... actual argument to sub2 is always present; it doesn't get a non-present ... E.g. nearly all my procedures have an optional argument "message_log" which is passed to a message display routine. ...
    (comp.lang.fortran)
  • Re: using optional arguments not present (bug)
    ... an attribute for an optional dummy argument that makes the dummy ... end subroutine sub ... Substitute whatever syntax for local_if_missing above; ... actual argument to sub2 is always present; it doesn't get a non-present ...
    (comp.lang.fortran)
  • Re: Inserting data in linked lists
    ... TYPE, POINTER:: head, tail ... SUBROUTINE get_values ... this is not valid since the associated dummy argument has the ... so I dont' really understand why the compiler is ...
    (comp.lang.fortran)
  • Re: More odd code that seems to work
    ... I suspect that you are alluding to the case where the Jacobian ... > "dummy" argument can be used. ... > argument" here means a stub routine, as it wouldn't make much sense in ... In that case, the subroutine is never ...
    (comp.lang.fortran)
  • Re: How to compile the example_itsol_1.f , and why always meets these errors.
    ... > Subroutine my_sub ... argument association applies only to assumed shape dummy ... it's declared with *explicit* shape, ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)