Define a primitive data type: Difference between revisions
Content added Content deleted
(→[[Defining Primitive Data Types#ALGOL 68]]: check that multiplication is possible for big integers.) |
|||
Line 77: | Line 77: | ||
- = (BOUNDED a, b)BOUNDED: value OF a + -value OF b ASSERTIN []BOUNDED(a,b), |
- = (BOUNDED a, b)BOUNDED: value OF a + -value OF b ASSERTIN []BOUNDED(a,b), |
||
* = (BOUNDED a, b)BOUNDED: |
* = (BOUNDED a, b)BOUNDED: |
||
IF |
IF ABS value OF a < sqrt max int AND ABS value OF b < sqrt max int THEN |
||
value OF a * value OF b ASSERTIN []BOUNDED(a,b) |
value OF a * value OF b ASSERTIN []BOUNDED(a,b) |
||
ELSE |
ELSE |
||
Line 182: | Line 182: | ||
out of bounds +12544 > [: +10000]- exiting to except bounds error |
out of bounds +12544 > [: +10000]- exiting to except bounds error |
||
</pre> |
</pre> |
||
===Other libraries or implementation specific extensions=== |
===Other libraries or implementation specific extensions=== |
||
As of February 2009 no open source libraries to do this task have been located. |
As of February 2009 no open source libraries to do this task have been located. |