This unit is used by the Expressions unit and contains functions that process calculations with one or two operands and calculation operation. This unit actually generates code for addition, subtraction, multiplication, division, shifts, etc.
|
Turbo Pascal generates code for all mathemathical operations with two operands by the following procedure.
|
This procedure checks if operation is PChar ± Integer or PChar ± PChar. If so it generates code and returns True otherwise it returns False.
|
Constant sets are located into temprary buffer and expression Value holds offset to this buffer. Non-constant sets are always expanded to stack frame.
|
Constant strings are added in the temporary buffer, while all non-constant string operations are performed in stack frame.
|
Constant Extended values are always stored in expression Value, while for non-constant expressions numeric constants are stored in code block and FPU instructions are used for calculation.
|
For Real operations code is always generated.
|
Pointer operations are similar to Integer operations. However, only extended Turbo Pascal syntax allows pointer operations other than equality check.
|
Many operations in Turbo Pascal can be calculated as integer operations. This applies to pointers, Boolean values, enumerated values and Char values.
|
This procedure generates code to compare two LongInt values. Again, for some special cases shorter code is generated.
|
|
|
<< Start < Prev 1 2 Next > End >>
|