Is allocate a function or subroutine?

Your rules of thumb are a good way to distinguish:

  1. Function Calls in Expressions: Functions return values and are used in expressions.
  2. Subroutine Calls Start with ‘call’: Subroutines perform tasks without returning values and often start with ‘call’ in some languages.
  3. Statements Stand Alone: Statements are independent instructions that perform actions.