Announcement

Collapse
No announcement yet.

Order of statements/metastatements

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

  • Order of statements/metastatements

    While merging the code for several small dlls into one dll, I noticed that PB requires that you put metastatements before any "regular statements". Am I correct? And are there any other rules for the order of code, such as the position of DECLAREs, equates, etc.? I didn't see anything in the manual or help file about this.

    Thanks!




    -------------
    Mark Newman
    Mark Newman

  • #2
    I've never had any problems putting DECLARE statements or equates in the source preceding the procedure in which they are referenced; that is, I can have

    Code:
    DECLARE SUB xxxx
    DECLARE FUNCTION....
    %One = 1
    SUB Foo...
    END SUB
    FUNCTION Bar..
    END FUNCTION
    
    DECLARE SUB baz
    %THREE = 3
    SUB Baz..
    END SUB
    Near as I can tell, anything goes as long as you follow the cardinal rule: A DECLARE for a procedure or "define" for an equate must physically precede its use in code.

    MCM

    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment

    Working...
    X