Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > SDL script for generating code > SDL script extensions for TDK > %opt and %nopt statements (SDL script)
  
%opt and %nopt statements (SDL script)
This topic applies to TDK SDL script extensions. For more information, see Overview of SDL script extensions for TDK (SDL script).
SDL Script Extensions for TDK:
%string AString = "class "
AString %opt " " %nopt %c:Name " {\n"
%opt specifies the following "free text" expressions will be appended into the output if they are not present, that is, the current output buffer does not already terminate with the same expression.
In the above example, %opt " " does not append anything because the output generated by AString already terminates with a blank.
%nopt resumes the normal operations, that is, subsequent expressions are generated regardless of whether they are in the output or not.