Self-named variables

hi!
i’m wondering, i miss that possibility to name the variables. like timer1 or trigger_inst5.
would that be possible? hard to keep track on the double letter variables.

cheers, henrik

Hi,

I’m afraid not. You can name timers but not variables. Variables are restricted to 2 letter abbreviations as discussed in the user manual.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

ah ok, thats sad. when using 50 or more I would probably loose them in the code.

maybe a little variables-library windows would help, where all variables are listed in a table and you could write comments next to it.
greetings, henrik

Yes, here is what I do.

  1. I create a translator the triggers a timer (I call it "Init) when the project is opened.
  2. The Init translator has the rules to initialize (and document) all used global variables. I usually put them in alphabetical order
  3. I then refer to the rules of that translator when creating new global variables or referencing existing ones. I then have a single point of reference for all used global variables.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
1 Like

Hey Steve,

ok I see, thanks!! yes in fact i do remember doing that back in school
days :slight_smile:

cheers

I have a text file that contains all meanings of variables
Also made a tool to dump the unused variables list

See also:

 Cross reference all variables, timers, etc: https://www.bome.com/support/kb/cross-reference-list-of-all-variables-in-a-mt-pro-project 

Array emulation via compilation: https://www.bome.com/support/kb/array-emulation-using-4-sequential-variables-and-automatic-generation-of-rules