We all write code like this all the time so I'm looking for THE definitive answer in terms of performance.
In NAV2017+ which is the fastest statement:
1)
IF GLSetup.GET THEN
IF GLSetup.Fieldname THEN
DoSomething := TRUE;
or
2)
IF (GLSetup.GET) AND (GLSetup.Fieldname) THEN
DoSomething := TRUE;
The 2nd one is my preference and I think it is neater but want the one that executes fastest...
In NAV2017+ which is the fastest statement:
1)
IF GLSetup.GET THEN
IF GLSetup.Fieldname THEN
DoSomething := TRUE;
or
2)
IF (GLSetup.GET) AND (GLSetup.Fieldname) THEN
DoSomething := TRUE;
The 2nd one is my preference and I think it is neater but want the one that executes fastest...