Yihui Xie
2017-Jun-16 17:47 UTC
[Rd] R history: Why 'L; in suffix character ‘L’ for integer constants?
Yeah, that was what I heard from our instructor when I was a graduate student: L stands for Long (integer). Regards, Yihui -- https://yihui.name On Fri, Jun 16, 2017 at 11:00 AM, Serguei Sokol <sokol at insa-toulouse.fr> wrote:> Le 16/06/2017 ? 17:54, Henrik Bengtsson a ?crit : >> >> I'm just curious (no complaints), what was the reason for choosing the >> letter 'L' as a suffix for integer constants? Does it stand for >> something (literal?), is it because it visually stands out, ..., or no >> specific reason at all? > > My guess is that it is inherited form C "long integer" type (contrary to > "short integer" or simply "integer") > https://en.wikipedia.org/wiki/C_data_types
William Dunlap
2017-Jun-16 18:20 UTC
[Rd] R history: Why 'L; in suffix character ‘L’ for integer constants?
But R "integers" are C "ints", as opposed to S "integers", which are C "long ints". (I suppose R never had to run on ancient hardware with 16 bit ints.) Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Jun 16, 2017 at 10:47 AM, Yihui Xie <xie at yihui.name> wrote:> Yeah, that was what I heard from our instructor when I was a graduate > student: L stands for Long (integer). > > Regards, > Yihui > -- > https://yihui.name > > > On Fri, Jun 16, 2017 at 11:00 AM, Serguei Sokol <sokol at insa-toulouse.fr> > wrote: > > Le 16/06/2017 ? 17:54, Henrik Bengtsson a ?crit : > >> > >> I'm just curious (no complaints), what was the reason for choosing the > >> letter 'L' as a suffix for integer constants? Does it stand for > >> something (literal?), is it because it visually stands out, ..., or no > >> specific reason at all? > > > > My guess is that it is inherited form C "long integer" type (contrary to > > "short integer" or simply "integer") > > https://en.wikipedia.org/wiki/C_data_types > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel[[alternative HTML version deleted]]
peter dalgaard
2017-Jun-16 18:53 UTC
[Rd] R history: Why 'L; in suffix character ‘L’ for integer constants?
Wikipedia claims that C ints are still only guaranteed to be at least 16 bits, and longs are at least 32 bits. So no, R's integers are long. -pd> On 16 Jun 2017, at 20:20 , William Dunlap via R-devel <r-devel at r-project.org> wrote: > > But R "integers" are C "ints", as opposed to S "integers", which are C > "long ints". (I suppose R never had to run on ancient hardware with 16 bit > ints.) > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > On Fri, Jun 16, 2017 at 10:47 AM, Yihui Xie <xie at yihui.name> wrote: > >> Yeah, that was what I heard from our instructor when I was a graduate >> student: L stands for Long (integer). >> >> Regards, >> Yihui >> -- >> https://yihui.name >> >> >> On Fri, Jun 16, 2017 at 11:00 AM, Serguei Sokol <sokol at insa-toulouse.fr> >> wrote: >>> Le 16/06/2017 ? 17:54, Henrik Bengtsson a ?crit : >>>> >>>> I'm just curious (no complaints), what was the reason for choosing the >>>> letter 'L' as a suffix for integer constants? Does it stand for >>>> something (literal?), is it because it visually stands out, ..., or no >>>> specific reason at all? >>> >>> My guess is that it is inherited form C "long integer" type (contrary to >>> "short integer" or simply "integer") >>> https://en.wikipedia.org/wiki/C_data_types >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel-- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
Maybe Matching Threads
- R history: Why 'L; in suffix character ‘L’ for integer constants?
- R history: Why 'L; in suffix character ‘L’ for integer constants?
- R history: Why 'L; in suffix character ‘L’ for integer constants?
- R history: Why 'L; in suffix character ‘L’ for integer constants?
- R history: Why 'L; in suffix character ‘L’ for integer constants?