Post Go back to editing

Why are basic things undocumented

Thread Summary

The user inquired about the lack of documentation for the conditional ternary operator in LTspice, which is supported but not mentioned in the official help. The support engineer confirmed it as an oversight and will document the feature, noting that it is used in SPICE models provided by vendors like onsemi and is converted to an equivalent 'if' function in the Expanded Netlist.
AI Generated Content
Category: Software
Product Number: LTspice
Software Version: 24.1.10

Why, oh why, does the LTspice Help not document simple things such as the conditional ternary operator (i.e. ? :) ?

This operator is supported by LTspice, at least for a behavioral source. It is converted to an equivalent "if" function in the Expanded Netlist.

It is used in SPICE models provided by some vendors (onsemi in my most recent example).

And yet it is nowhere to be seen in the LTspice documentation!

Please correct the LTspice documentation to reflect the complete syntax that LTspice accepts. We shouldn't need external sites or tribal knowledge to figure out what is valid LTspice input.

I understand there may be proprietary features or functions that are only for use by ADI, and hence undocumented, but surely the correct processing of the ternary operator does not fall into that category. 

BTW, it's not a secret since Google's AI knows that LTspice supports the ternary operator even if the LTspice documentation doesn't.

Edit Notes

Simplify and clarify subject
[edited by: DennisCote at 9:44 PM (GMT -5) on 5 Nov 2025]
Parents
  • Hi  ,

    Why, oh why, does the LTspice Help not document simple things such as the conditional ternary operator

    That is a good question. We have had to ask this exact question for a number features. In this case, it looks like oversight at some point in the history of LTspice.

    I understand there may be proprietary features or functions that are only for use by ADI, and hence undocumented, but surely the correct processing of the ternary operator does not fall into that category. 

    And, you just answered the above question. "Certainly" is a strong word that could easily be interpreted as "One must assume". Why? Again, the dev group grapples with this every day. "Hey, look, undocumented feature. Why undocumented? We first must determine, as best as possible without any meta-doc, the reason it is undocumented. In this case, after careful research, it appears to be oversight, from long ago, so we will document it.

    This operator is supported by LTspice, at least for a behavioral source. It is converted to an equivalent "if" function in the Expanded Netlist.

    Pretty cool. We should document this, and will.

    BTW, it's not a secret since Google's AI knows that LTspice supports the ternary operator even if the LTspice documentation doesn't.

    Well, maybe. You are probably not surprised that I (we) sometimes use Google AI to find out about esoteric (undocumented) LTspice features. My hit rate on correct answers is about a coin flip when approaching more abstruse features. Google AI will conveniently reproduce incorrect instructions.

    Thanks for pointing out the missing doc on this useful feature.

    mike

Reply
  • Hi  ,

    Why, oh why, does the LTspice Help not document simple things such as the conditional ternary operator

    That is a good question. We have had to ask this exact question for a number features. In this case, it looks like oversight at some point in the history of LTspice.

    I understand there may be proprietary features or functions that are only for use by ADI, and hence undocumented, but surely the correct processing of the ternary operator does not fall into that category. 

    And, you just answered the above question. "Certainly" is a strong word that could easily be interpreted as "One must assume". Why? Again, the dev group grapples with this every day. "Hey, look, undocumented feature. Why undocumented? We first must determine, as best as possible without any meta-doc, the reason it is undocumented. In this case, after careful research, it appears to be oversight, from long ago, so we will document it.

    This operator is supported by LTspice, at least for a behavioral source. It is converted to an equivalent "if" function in the Expanded Netlist.

    Pretty cool. We should document this, and will.

    BTW, it's not a secret since Google's AI knows that LTspice supports the ternary operator even if the LTspice documentation doesn't.

    Well, maybe. You are probably not surprised that I (we) sometimes use Google AI to find out about esoteric (undocumented) LTspice features. My hit rate on correct answers is about a coin flip when approaching more abstruse features. Google AI will conveniently reproduce incorrect instructions.

    Thanks for pointing out the missing doc on this useful feature.

    mike

Children
No Data