[Oberon] ReadInt vs ReadNum

Srinivas Nayak sinu.nayak2001 at gmail.com
Sun Jun 19 09:20:17 CEST 2016


Dear Chris,

Many thanks for your quick reply.
Now I see, WriteNum/ReadNum are indeed awesome features.


With thanks and best regards,

Yours sincerely,
Srinivas Nayak

Home: http://www.mathmeth.com/sn/
Blog: http://srinivas-nayak.blogspot.in/

On 06/19/2016 12:23 PM, Chris Burrows wrote:
>> -----Original Message-----
>> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
>> Srinivas Nayak
>> Sent: Sunday, 19 June 2016 3:10 PM
>> To: ETH Oberon and related systems
>> Subject: [Oberon] ReadInt vs ReadNum
>>
>> What is the difference between Files.ReadInt and Files.ReadNum?
>> Where to use which one?
>>
>
> Use Files.ReadInt if Files.WriteInt was used to write to the file you are
> reading from and Files.ReadNum if Files.WriteNum was used.
>
> Assuming 32 bit integers, WriteNum uses from 1 to 5 bytes to store the
> integer depending on its size whereas WriteInt always uses 4 bytes.
>
> Hence, you would use WriteNum to write integers to a file if your data
> contained a majority of small integers and you wanted smaller file sizes and
> faster read / write times.
>
>
> Regards,
> Chris
>
> Chris Burrows
> CFB Software
> http://www.astrobe.com
>
>
>
>
>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>


More information about the Oberon mailing list