MemCom Reference Manual > Conversion from MemCom version 6 to Version 7 > Set size and database addresses

2. Set size and database addresses

The addresses of elements on a databases are now counted in bytes rather than in 'words':

 Version 6Version 7
Base size of elementWordByte
File Address OffsetWordByte
File Start AddressWord 1Byte 0

The C API now fully complies to the new standard of version 7. However, for compatibility reasons, the 'old' Fortran API functions still adhere to the version 6 standard. Examples: The Fortran API function calls prpdb and lgtdb return the 'word' address, i.e the number of 32 bit elements, starting at element 1. The 'word-addressable' paged file access functions, like

subroutine rdvdb(handle,ipos,buffer,nword,status)
subroutine wrvdb(handle,ipos,buffer,nword,status)
subroutine wtwadb(handle,buffer,ipos,nword,status)
subroutine rdwadb(handle,buffer,ipos,nword,status)

operate on 'word' address, i.e the number of 32 bit elements, starting at element 1, and the number of elements nword is counted in 'words', i.e in 32 bit units.

In the new C API the type of some arguments automatically adapt to 32 or 64 bit platforms. Thus, mcSize, mcOff are 32 bit or a 64 bit integers. Note that the size information is always stored in 64 bits on the database!