Is allocate a function or subroutine?

This question came to me when I was driving today.

1 Like

It’s a statement. :slight_smile:

Rules of thumb I use to tell them apart:

  • Function calls appear in expressions.
  • Subroutine calls begin with call.
  • Statements stand on their own.
3 Likes

I mistakenly write call allocate(...) more often than I care to admit :upside_down_face:

2 Likes