Dear All, What is the difference between Files.ReadInt and Files.ReadNum? Where to use which one? With thanks and best regards, Yours sincerely, Srinivas Nayak Home: http://www.mathmeth.com/sn/ Blog: http://srinivas-nayak.blogspot.in/
-----Original Message----- From: Oberon [mailto:oberon-bounces@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
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@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@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
If you want to exchange files between machines with different endianess don't use ReadInt/WriteInt. Those procedures only work between machines with the same endianess. ReadNum/WriteNum define a true presentation layer with a clear semantic. The LONGINTs are encoded very compactly. Jörg
Am 19.06.2016 um 09:20 schrieb Srinivas Nayak <sinu.nayak2001@gmail.com>:
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@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@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Jörg Straube, if you want us to see and respond to your messages, you are going to have to disable your secure signature app. -----Original Message----- From: Jörg Straube Sent: Sunday, June 19, 2016 2:47 AM To: ETH Oberon and related systems Subject: Re: [Oberon] ReadInt vs ReadNum -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
John R. Strohm <strohm@airmail.net> wrote:-
Jörg Straube, if you want us to see and respond to your messages, you are going to have to disable your secure signature app.
Yes, these new fad/update absurdities, like replacing the <single quote> by 3-bytes must be avoided. The amount of redundancy in eg. http is disgusting. IMO it comes from the US "infinity frontier" tradition. == Chris Glur. On 6/20/16, John R. Strohm <strohm@airmail.net> wrote:
Jörg Straube, if you want us to see and respond to your messages, you are going to have to disable your secure signature app.
-----Original Message----- From: Jörg Straube Sent: Sunday, June 19, 2016 2:47 AM To: ETH Oberon and related systems Subject: Re: [Oberon] ReadInt vs ReadNum
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
--- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
1) Digitally signing an email is a technology more than 10 years old. First standard RFC1847 / 1995, with several refinements upto the latest version 3.2 standardized in RFC5751 / 2010. Almost all current email clients support this S/MIME extension today. Just ignore the signature attachment if you are not interested in. 2) To explain the mentioned "absurdity", I use Unicode notation. There are different symbols to start and close a quote: U+0022 Quotation mark (") U+0027 Apostrophe (') U+2018 Left Single Quotation mark U+2019 Right Single Quotation mark U+201C Left Double Quotation mark U+201D Right Double Quotation mark Not distinguishing the opening and closing of a quote is typographically not pleasing. Therefore, it is recommended using one of the latter four instead of first two The first two Unicode symbols can be coded in ASCII, the latter four can not be coded in ASCII and are normally coded in one of the UTF flavours. UTF-8 is a superset of ASCII and uses more than one byte to code Unicode symbols larger than U+007F. In some email clients or text editors you can set an option how to treat/code quotation marks. Jörg
Am 22.06.2016 um 05:43 schrieb eas lab <lab.eas@gmail.com>:
John R. Strohm <strohm@airmail.net> wrote:-
Jörg Straube, if you want us to see and respond to your messages, you are going to have to disable your secure signature app.
Yes, these new fad/update absurdities, like replacing the <single quote> by 3-bytes must be avoided.
The amount of redundancy in eg. http is disgusting. IMO it comes from the US "infinity frontier" tradition.
== Chris Glur.
On 6/20/16, John R. Strohm <strohm@airmail.net> wrote: Jörg Straube, if you want us to see and respond to your messages, you are going to have to disable your secure signature app.
-----Original Message----- From: Jörg Straube Sent: Sunday, June 19, 2016 2:47 AM To: ETH Oberon and related systems Subject: Re: [Oberon] ReadInt vs ReadNum
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
--- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
This one was readable. -----Original Message----- From: Jörg Straube Sent: Wednesday, June 22, 2016 1:52 AM To: ETH Oberon and related systems Subject: Re: [Oberon] ReadInt vs ReadNum 1) Digitally signing an email is a technology more than 10 years old. First standard RFC1847 / 1995, with several refinements upto the latest version 3.2 standardized in RFC5751 / 2010. Almost all current email clients support this S/MIME extension today. Just ignore the signature attachment if you are not interested in. 2) To explain the mentioned "absurdity", I use Unicode notation. There are different symbols to start and close a quote: U+0022 Quotation mark (") U+0027 Apostrophe (') U+2018 Left Single Quotation mark U+2019 Right Single Quotation mark U+201C Left Double Quotation mark U+201D Right Double Quotation mark Not distinguishing the opening and closing of a quote is typographically not pleasing. Therefore, it is recommended using one of the latter four instead of first two The first two Unicode symbols can be coded in ASCII, the latter four can not be coded in ASCII and are normally coded in one of the UTF flavours. UTF-8 is a superset of ASCII and uses more than one byte to code Unicode symbols larger than U+007F. In some email clients or text editors you can set an option how to treat/code quotation marks. Jörg
Am 22.06.2016 um 05:43 schrieb eas lab <lab.eas@gmail.com>:
John R. Strohm <strohm@airmail.net> wrote:-
Jörg Straube, if you want us to see and respond to your messages, you are going to have to disable your secure signature app.
Yes, these new fad/update absurdities, like replacing the <single quote> by 3-bytes must be avoided.
The amount of redundancy in eg. http is disgusting. IMO it comes from the US "infinity frontier" tradition.
== Chris Glur.
On 6/20/16, John R. Strohm <strohm@airmail.net> wrote: Jörg Straube, if you want us to see and respond to your messages, you are going to have to disable your secure signature app.
-----Original Message----- From: Jörg Straube Sent: Sunday, June 19, 2016 2:47 AM To: ETH Oberon and related systems Subject: Re: [Oberon] ReadInt vs ReadNum
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
--- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
participants (5)
-
Chris Burrows -
eas lab -
John R. Strohm -
Jörg Straube -
Srinivas Nayak