# Error: Rank mismatch in argument 'std' at (1) (scalar and rank-1)

**URL:** <https://fortran-lang.discourse.group/t/error-rank-mismatch-in-argument-std-at-1-scalar-and-rank-1/3529>\
**Category:** Uncategorized\
**Created:** [May 23, 2022, 4:10pm UTC](https://fortran-lang.discourse.group/t/error-rank-mismatch-in-argument-std-at-1-scalar-and-rank-1/3529 "2022-05-23T16:10:44Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Post date:** [May 24, 2022, 6:56am UTC](https://fortran-lang.discourse.group/t/error-rank-mismatch-in-argument-std-at-1-scalar-and-rank-1/3529/7 "2022-05-24T06:56:30Z")

</div>

The answer lies in your other thread ([Error: IF clause at (1) requires a scalar LOGICAL expression](https://fortran-lang.discourse.group/t/error-if-clause-at-1-requires-a-scalar-logical-expression/3537)).

```fortran
  LOGICAL FUNCTION RUZE(CARD1,CARD2)
  IMPLICIT NONE
  CHARACTER CARD1*(*)
  CHARACTER(*) ::CARD2(:) ! assumed-shape array, previously assumed-size

```

> [@giraffe](#):
>
> What do I do about the requirement of requiring an explicit interface?

You provide one. The two options are 1) any procedure which calls `RUZE` should contain a block such as

```fortran
INTERFACE
  LOGICAL FUNCTION RUZE(CARD1,CARD2)
    IMPLICIT NONE
    CHARACTER CARD1*(*)
    CHARACTER(*) ::CARD2(:)
  END FUNCTION
END INTERFACE

```

You can use an include statement if want to save yourself the typing. The better solution 2) is to define the interface (or the entire) procedure in a named module. Calling routines can then `use` that module.

Alternatively, you could get rid of the assumed-shape array (the one ending with `(:)`) and use some F77-conforming solution instead. Unfortunately, given the changes you are making, it’s almost impossible to figure out your intentions. Are `CARD1` and `CARD2` supposed to be arrays or scalars (single cards)?

---

_[View the full topic](https://fortran-lang.discourse.group/t/error-rank-mismatch-in-argument-std-at-1-scalar-and-rank-1/3529)._
