Modula-2 Reloaded

A Modern Typesafe & Literate Programming Notation

Site Menu

Project

Specification

Implementation

Recommendations

Reference

Needs Updating

Work in Progress

Wastebasket

Wiki Manual

edit SideBar

Type SIZEINT

WiP.TypeSIZEINT History

Hide minor edits - Show changes to output

2010-03-21 16:48 by benjk -
Changed lines 4-5 from:
Type @@SIZEINT@@ would be a signed integer type that can hold values in the range -1 to the size of the largest allocatable storage area measured in octets. Functions @@SIZE@@, @@TSIZE@@, @@HIGH@@ and @@LENGTH@@ would then return values of type @@SIZEINT@@. The type would be defined as:
to:
Type @@SIZEINT@@ would be a signed integer type that can hold values in the range -1 to the size of the largest allocatable storage area measured in octets. The type would map to POSIX' ssize_t type. Functions @@SIZE@@, @@TSIZE@@, @@HIGH@@ and @@LENGTH@@ would then return values of type @@SIZEINT@@. The size parameters of @@ALLOCATE@@ and @@DEALLOCATE@@ would be of type @@SIZEINT@@.

The type would be defined
as:
2010-03-21 16:46 by benjk -
Added lines 1-10:
[[#TypeSizeint]]
!!!!!Type @@SIZEINT@@

Type @@SIZEINT@@ would be a signed integer type that can hold values in the range -1 to the size of the largest allocatable storage area measured in octets. Functions @@SIZE@@, @@TSIZE@@, @@HIGH@@ and @@LENGTH@@ would then return values of type @@SIZEINT@@. The type would be defined as:

>>background-color:#f4f4f4 padding:0.5em border:'thin solid gray' whitespace:pre<<
@@TMIN(SIZEINT) = -1@@ [[<<]]
@@TMAX(SIZEINT) = pow(2, (TSIZE(SIZEINT) * 8) DIV 2)@@ [[<<]]
@@TSIZE(SIZEINT) >= (TSIZE(ADDRESS) DIV 8) - 1@@ [[<<]]
>><<