Home AMX User Forum NetLinx Studio

Question about include files

I've been an AMX programmer a little over a year. I've notice that some programmers like to write include files for various things like device control, queue system, etc. I've just now started tinkering with this concept and have a question about variables in include files.

When I declare a variable in an include file, I can also access that variable in the main program correct? I like the concept of Netlinx Studio providing a list of variables and constants that I've declared. Makes it so that I don't have to remember the whole variable name just type something like nSys and the variable nSystemPower pops up in the list.

However, when in the main program and I type a variable declared in the include file it will not show up in the popup list. Is this just something I have to deal with or is there a trick I'm missing to make it show up?

Comments

  • Joe HebertJoe Hebert Posts: 2,159
    undrtkr wrote:
    Is this just something I have to deal with or is there a trick I'm missing to make it show up?
    Yes, that's the way it is. You're not missing any tricks.
  • undrtkrundrtkr Posts: 35
    Joe Hebert wrote:
    Yes, that's the way it is. You're not missing any tricks.

    Bummer! :(
  • annuelloannuello Posts: 294
    Feature request

    I'd like to see such variables (& devices & constants, etc) appear in the AutoComplete. I don't expect that the editor would/could follow a #include 'filename.axi' directive as specified in sourcecode. However, it should be able to look at all files in the Projects Include folder (in the Workspace window). It may be worth adding the option to turn off such a feature to the Preferences->Editor->Display section. I can't think of a situation where it would be painful, but someone else may be able to.

    Where a module has devices & variables as parameters, it would be nice for those to appear with syntax hilighting & auto complete throughout the module file.

    Roger McLean
    Swinburne Uni
Sign In or Register to comment.