Compiler warning on possible loss of precision
Compiler warning on possible loss of precision
Just a small wish that 4D compiler would detect and warn on possible losses of precision.
Right now 4D just truncates the decimal value without a peep.
SQL Engine
Begin SQL
UPDATE Table
SET FieldInteger =CAST(1.4 as INT)
WHERE id=29168
End SQL
Native 4D code
// assume loadable record
LOAD RECORD([Table])
[Table]FieldInteger:=1.4
SAVE RECORD([Table])
Link to official 4D feature request (login required).
Significant Revisions
- May 6th, 2024 Converted to jekyll markdown format and copied to personal site
- Apr 25th, 2011 Originally published on txcowboycoder wordpress site1
Footnotes
-
Initial
md
Generated using https://github.com/jsr6720/wordpress-html-scraper-to-mdOriginal Wordpress categories: [‘4D’, ‘Wish List’]
Original Wordpress tags: “4D”, “Wish List”, “possible loss of precision”, “real to integer”