Since tabnr is an expression you need to use backticks like you are in you’re second rowline. However in that line it’s trying to execute the returned value from that expression(‘5’), so you want to use ‘echo’ infront of the expression to print out it’s value.
That’s the difference between a command and an expression. A command does an action and possibly prints something out to the textport. An expression only ever returns a value. It’ll never print anything on it’s own and it’ll never change anything to do with the state of the file. It’s always just a query.
Right, when you are putting an expression into a parameter that expects a number, you don’t need backticks. When it’s going into a parameter that expects a string, then you need backticks.