[racket] Postfix hash syntax?
Thanks to Matthew for fixing and to Ankur Sethi for the clear explanation,
Jos
-----Original Message-----
From: Matthew Flatt [mailto:mflatt at cs.utah.edu]
Sent: viernes, 14 de octubre de 2011 15:15
To: Jos Koot
Cc: 'Ankur Sethi'; users at racket-lang.org
Subject: Re: [racket] Postfix hash syntax?
I see that section 1.3.3 includes `#' in the grammar of inexact
numbers, but it doesn't explain it. I'll fix that.
(As Thomas says, we inherited `#' from RnRS.)
At Fri, 14 Oct 2011 15:06:17 +0200, "Jos Koot" wrote:
> Try how 22.300 is responded to in the repl.
>
> I looked up section 1.3.3 of the Racket Reference. I wonder why this
postfix
> # notation is included. Does anyone have a clue?
>
> Jos
>
>
> -----Original Message-----
> From: users-bounces at racket-lang.org [mailto:users-bounces at racket-lang.org]
> On Behalf Of Ankur Sethi
> Sent: viernes, 14 de octubre de 2011 9:13
> To: users at racket-lang.org
> Subject: [racket] Postfix hash syntax?
>
> Hi,
>
> I've been wondering what the postfix hash syntax does. This is what
> happens when I append a # to an integer:
>
> > 9#
> 90.0
> > 9##
> 900.0
> > 9#####
> 900000.0
>
> Floating point numbers stay the same:
>
> > 22.3#
> 22.3
> > 22.3##
> 22.3
> > 22.3###
> 22.3
>
> I can't find this syntax in either the Racket Guide or the Reference.
> In fact, I accidentally stumbled upon this behavior when a friend
> mistyped 53 as "5#".
>
> Thanks.
>
> --
> Ankur Sethi
> (GeneralMaximus on IRC and elsewhere)
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users
>
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users