2

When I try to use the procedure in the if-condition below, it doesn't work.

proc "isAvailable"{
  bool false
}

loop[val index [int 0]]{

    if[isAvailable]{
          show-alert "Test"
    } else {
          show-alert[ $index |str]
    }
    if [$index | lt 200 ]{
          recur [$index | plus 50]
    }
}

The error message is Cannot match given parameters to declared parameters at if but I don't understand this message. Is a paramter needed as input to a procedure?

Adam Horvath
  • 1,249
  • 1
  • 10
  • 25
Julius L.
  • 21
  • 2

1 Answers1

0

Procedures can be declared without any parameters.

However, as the name "proc" suggests, they are only procedures: a set of commands without a returned value.

Adam Horvath
  • 1,249
  • 1
  • 10
  • 25