ERROR MESSAGE IN SCRIPTING
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-08-15 09:23 AM
2006-08-15
09:23 AM
SEEMS TO BE A THE POINT OF USING A IF THEN ELSE STATEMENT
' USE OF REAL TYPES CAN RESULT IN PRECISION PROBLEMS AT LINE XX OF FILE XXXXXX'
I THINK I HAVE ONLY HAD THIS MESSAGE SINCE MOVING TO AC 9
2 REPLIES 2
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-08-15 09:50 AM
2006-08-15
09:50 AM
This annoying message started appearing somewhere between 8.0 and 8.1 as I recall. It is alerting you to a potential problem. The trouble is that it usually is not an actual problem.
The warning is generated when you use a conditional statement (IF, WHILE, REPEAT) with a precise value for a real number as the condition. Such as:
IF x = 0 THEN...
rather than:
IF x > -0.0001 AND x < 0.0001...
As I understand it the actual problems arise when "x" is the result of a calculation, since rounding errors can produce very small inaccuracies which will prevent it from exactly equalling the desired value even though it should.
The trouble is that I (and many others I am sure) often use a named parameter as the condition with a VALUES statement to limit it to the precise values used in the conditional statements. This precludes any actual errors but still generates the pesky warning.
BTW, turn off your caps lock. It's not polite to shout😉
The warning is generated when you use a conditional statement (IF, WHILE, REPEAT) with a precise value for a real number as the condition. Such as:
IF x = 0 THEN...
rather than:
IF x > -0.0001 AND x < 0.0001...
As I understand it the actual problems arise when "x" is the result of a calculation, since rounding errors can produce very small inaccuracies which will prevent it from exactly equalling the desired value even though it should.
The trouble is that I (and many others I am sure) often use a named parameter as the condition with a VALUES statement to limit it to the precise values used in the conditional statements. This precludes any actual errors but still generates the pesky warning.
BTW, turn off your caps lock. It's not polite to shout
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-08-15 10:37 AM
2006-08-15
10:37 AM
Have a look to this thread:
Use of real types
and this:
Use of real types can result in precision problems
Use of real types
and this:
Use of real types can result in precision problems
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm