[fpc-devel] Question about Currency support
pascaldragon at googlemail.com
Mon Jun 4 10:22:35 CEST 2012
Am 04.06.2012 08:47 schrieb "Fuxin Zhang" <zhangfx at lemote.com>:
> for the statement i := j / 10.0, is that in the div node, resultdef
> refers to i, left refers to j, and right refers to 10.0?
> But for the typeconvnode, what is the result/left/right node?
AFAIK the tree of that statement will be the following:
Left: Loadnode for i
Right: BinaryNode for /:
Left: Loadnode for j
Right: Constnode for 10.0
Resultdef: floatdef (not necessarily the def of i)
If i and the resultdef of the binary node are not the same a typeconvnode
will also be added, where:
Left: the binary node
Right: Nil (AFAIK a typeconvnode doesn't have a right node at all...)
Resultdef: the degree if the target type (here the def if i)
> In general, is there a way for me to learn about the node generating
> process? E.g. add print somewhere to show it? Add in each node seems too
AFAIK FPC has an option for this. Call the compiler using -h and check the
-v options. One of them should dump the tree to a txt file.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel