B4P considers theb following numbers:
Good Examples | Interpretation | Bad Examples | Interpretation |
---|---|---|---|
12 | Number | 1 2 | Text "1 2" |
1234.50 | Number | 1,234.50 | Syntax error (comma) |
.1 | Number (0.1) | . | Text (point) |
num(1.2E3) | Use function for scientifi notation | 1.2E3 | Text "1.2E3" |
echo( 1 ); // Simple numeral
echo( 1 1 + 2 2 ); // Attention: These two numbers are strings : '1 12 2' is returned, not '33' or '3 3'
echo( 123.45 );
echo( 0123.450 ); // Same value as above. B4P retains the original "look" if no calculations are applied.
echo( 0123.450 *1); // Operation applied (multplied by 1), therefore text representation has been dropped
1
1 12 2
123.45
0123.450
123.45