CompileErrors/C0030: Difference between revisions

From Compost Wiki
Jump to navigation Jump to search
Danielr (talk | contribs)
No edit summary
Danielr (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{CompileError
{{CompileError
|errortext = C0030 - Optimizer: Skipping precomputable node '<command>' because optimizing it might change output formatting.
|errortext = C0030 - Optimizer: Skipping precomputable node '<command>' because optimizing it might change output formatting.
|description = C0030 is issued when a math command could be precomputed, but it would affect the output if the command were formatted differently than the numeric constant.
|description = C0030 is issued when a math command could be precomputed, but it would affect the output if the command were formatted differently than the numeric constant.  When C0030 is issued, the optimization is skipped, so that the output is still formatted by the math command.
|exampletext = The result of SUB# is output to the stream after being formatted.
|exampletext = The result of SUB# is output to the stream after being formatted.
|examplecode = FORMAT(SUB#, 'MyFormat')
|examplecode = FORMAT(SUB#, 'MyFormat')
Line 7: Line 7:
SUB#(NUM#('1.0'), NUM#('0.0')) { C0030 - Optimizer: Skipping precomputable node 'SUB#' because optimizing it might change output formatting. }
SUB#(NUM#('1.0'), NUM#('0.0')) { C0030 - Optimizer: Skipping precomputable node 'SUB#' because optimizing it might change output formatting. }
|resolutiontext = Remove the unnecessary commands, or enclose them in an [[Output]] command to format them.
|resolutiontext = Remove the unnecessary commands, or enclose them in an [[Output]] command to format them.
|resolutioncode = Output('MyFormat', 1.0)
|resolutioncode = Output('MyFormat', 1.0) { No error }
}}
}}

Latest revision as of 18:49, 12 May 2015

C0030 - Optimizer: Skipping precomputable node '<command>' because optimizing it might change output formatting.

Description

C0030 is issued when a math command could be precomputed, but it would affect the output if the command were formatted differently than the numeric constant. When C0030 is issued, the optimization is skipped, so that the output is still formatted by the math command.

Example of Cause

The result of SUB# is output to the stream after being formatted.

FORMAT(SUB#, 'MyFormat')

SUB#(NUM#('1.0'), NUM#('0.0')) { C0030 - Optimizer: Skipping precomputable node 'SUB#' because optimizing it might change output formatting. }

Resolution

Remove the unnecessary commands, or enclose them in an Output command to format them.

Output('MyFormat', 1.0) { No error }