Announcement

Collapse
No announcement yet.

#REGISTER, REGISTER Var

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #REGISTER, REGISTER Var

    What is the relationship between #REGISTER and REGISTER Var, i. e., does #REGISTER over-ride REGISTER Var or visa-versa?
    Walt Decker

  • #2
    "Visa-versa"

    The #REGISTER metastatement works at two levels - a "global" setting, and a "local" setting for each Sub/Function/Method/Property. To set the global default #REGISTER options, it must precede all executable code. To override the global register option for an individual routine, it must be placed between the FUNCTION/END FUNCTION, SUB/END SUB, METHOD/END METHOD, or PROPERTY/END PROPERTY pairs before any executable code.
    Forum: http://www.jose.it-berater.org/smfforum/index.php

    Comment


    • #3
      José:

      That's mentions #REGISTER but has no reference to REGISTER Var.

      REGISTER statement
      Purpose
      To define Register variables, which are local to a Sub or Function. The REGISTER statement provides an optimization hint to the compiler.

      Syntax
      REGISTER variable [AS type] [, variable [AS type]]
      I'm guessing that REGISTER Var over-rides #REGISTER, but the docs are a little fuzzy about it.
      Walt Decker

      Comment


      • #4
        I'm guessing that REGISTER Var over-rides #REGISTER
        Otherwise it will no make sense the following:

        The REGISTER statement allows you to choose which variables will be classified as Register variables.
        Forum: http://www.jose.it-berater.org/smfforum/index.php

        Comment

        Working...
        X