Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    \$\begingroup\$ I won't disallow this answer, because it's synonymous for me disallowing due to language capability for output types. \$\endgroup\$ Commented Jan 18, 2017 at 7:13
  • 1
    \$\begingroup\$ What does the # do here? \$\endgroup\$ Commented Jan 19, 2017 at 3:47
  • \$\begingroup\$ The #if and #ElseIf are conditional compilation statements meaning that the statements that follow it are only compiled if the condition is true \$\endgroup\$ Commented Jan 22, 2017 at 0:13
  • 1
    \$\begingroup\$ So, if they're not true, the statements aren't compiled...that's different than not using #, where they'd be compiled whether or not the statements are true? I know how If statements work, but I'm new to getting down to what actually compiles, so sorry for such a simple question. \$\endgroup\$ Commented Jan 22, 2017 at 0:59
  • 1
    \$\begingroup\$ @BruceWayne, yes, that is exactly the case. Because these lines are designed to throw specific errors, it is necessary to have only the lines that produce the desired error code be compiled at a give time. To do this #if is used in place of If or Select Case as only truthy conditional statements are actually compiled. In this case specifically, this keeps the program from exiting with error code 3, Return without GoSub on every execution, but rather only exiting with this code when n=3 \$\endgroup\$ Commented Jan 22, 2017 at 17:44