¿ªÔÆÌåÓý

Syntax error on .MEAS in 24.1.x


 

¿ªÔÆÌåÓý

A new error seems to have crept into .MEAS directives on the 24.1 branch.

Measurement names are apparently not now allowed to have a sign character in them, e.g.:

.MEAS Tpd+ param T1-T0
.MEAS Tpd- param T11-T10


.. results in:

I:\tony\Documents\Simulations\LTspice\Comparator\UniversalComp\Dev\UniversalComp_Test.net(37): syntax error
.MEAS Tpd+ param T1-T0
???????? ^^^^^^^^^^^^^
I:\tony\Documents\Simulations\LTspice\Comparator\UniversalComp\Dev\UniversalComp_Test.net(38): syntax error
.MEAS Tpd- param T11-T10
???????? ^^^^^^^^^^^^^^^

This has worked in all previous versions. In the logfile, normally it would show, e.g.:

tpd+: t1-t0=1.08114e-08
tpd-: t11-t10=1.09962e-08


--
Regards,
Tony


 

This is an intentional change that removes an ambiguity.
Each measurement name can be used in other .meas expressions. Suppose you have two measurement names "A" and "A+A". What would be the meaning of the expression "A+A"?
In short, math operators are not allowed in parameter names.
?
Best Regards,
Mathias
?
On Tue, May 20, 2025 at 05:55 PM, Tony Casey wrote:

A new error seems to have crept into .MEAS directives on the 24.1 branch.

Measurement names are apparently not now allowed to have a sign character in them, e.g.:

.MEAS Tpd+ param T1-T0
.MEAS Tpd- param T11-T10


.. results in:

I:\tony\Documents\Simulations\LTspice\Comparator\UniversalComp\Dev\UniversalComp_Test.net(37): syntax error
.MEAS Tpd+ param T1-T0
???????? ^^^^^^^^^^^^^
I:\tony\Documents\Simulations\LTspice\Comparator\UniversalComp\Dev\UniversalComp_Test.net(38): syntax error
.MEAS Tpd- param T11-T10
???????? ^^^^^^^^^^^^^^^

This has worked in all previous versions. In the logfile, normally it would show, e.g.:

tpd+: t1-t0=1.08114e-08
tpd-: t11-t10=1.09962e-08


--
Regards,
Tony


 

¿ªÔÆÌåÓý

OK, I get that it's a potential issue, although it has never arisen for me. Perhaps changes like this can be mentioned in the LTspice Change Log, with a note advising of potential backward compatibility problems? This is a sensitive issue, as it can break production systems.

I understand the motivation for cleaning up the code, but it comes with risks.

--
Regards,
Tony

On 20/05/2025 18:17, Mathias Born via groups.io wrote:

This is an intentional change that removes an ambiguity.
Each measurement name can be used in other .meas expressions. Suppose you have two measurement names "A" and "A+A". What would be the meaning of the expression "A+A"?
In short, math operators are not allowed in parameter names.
?
Best Regards,
Mathias
?
On Tue, May 20, 2025 at 05:55 PM, Tony Casey wrote:
A new error seems to have crept into .MEAS directives on the 24.1 branch.

Measurement names are apparently not now allowed to have a sign character in them, e.g.:

.MEAS Tpd+ param T1-T0
.MEAS Tpd- param T11-T10


.. results in:

I:\tony\Documents\Simulations\LTspice\Comparator\UniversalComp\Dev\UniversalComp_Test.net(37): syntax error
.MEAS Tpd+ param T1-T0
???????? ^^^^^^^^^^^^^
I:\tony\Documents\Simulations\LTspice\Comparator\UniversalComp\Dev\UniversalComp_Test.net(38): syntax error
.MEAS Tpd- param T11-T10
???????? ^^^^^^^^^^^^^^^

This has worked in all previous versions. In the logfile, normally it would show, e.g.:

tpd+: t1-t0=1.08114e-08
tpd-: t11-t10=1.09962e-08


--
Regards,
Tony


 

As a c programmer and LTspice user, I would never label my variables "A+A". Just saying.


On Tue, May 20, 2025 at 12:59 PM, Tony Casey via groups.io
<antoniustrevorum@...> wrote:
OK, I get that it's a potential issue, although it has never arisen for me. Perhaps changes like this can be mentioned in the LTspice Change Log, with a note advising of potential backward compatibility problems? This is a sensitive issue, as it can break production systems.

I understand the motivation for cleaning up the code, but it comes with risks.

--
Regards,
Tony

On 20/05/2025 18:17, Mathias Born via groups.io wrote:
This is an intentional change that removes an ambiguity.
Each measurement name can be used in other .meas expressions. Suppose you have two measurement names "A" and "A+A". What would be the meaning of the expression "A+A"?
In short, math operators are not allowed in parameter names.
?
Best Regards,
Mathias
?
On Tue, May 20, 2025 at 05:55 PM, Tony Casey wrote:
A new error seems to have crept into .MEAS directives on the 24.1 branch.

Measurement names are apparently not now allowed to have a sign character in them, e.g.:

.MEAS Tpd+ param T1-T0
.MEAS Tpd- param T11-T10


.. results in:

I:\tony\Documents\Simulations\LTspice\Comparator\UniversalComp\Dev\UniversalComp_Test.net(37): syntax error
.MEAS Tpd+ param T1-T0
???????? ^^^^^^^^^^^^^
I:\tony\Documents\Simulations\LTspice\Comparator\UniversalComp\Dev\UniversalComp_Test.net(38): syntax error
.MEAS Tpd- param T11-T10
???????? ^^^^^^^^^^^^^^^

This has worked in all previous versions. In the logfile, normally it would show, e.g.:

tpd+: t1-t0=1.08114e-08
tpd-: t11-t10=1.09962e-08


--
Regards,
Tony


 

On Tue, May 20, 2025 at 01:02 PM, Richard Andrews wrote:
As a c programmer and LTspice user, I would never label my variables "A+A". Just saying.
But might you use a parameter name of "Tpd+"?
?
Andy
?