Why ~a, ~s, and ~v?

61 views
Skip to first unread message

primer

unread,
Oct 26, 2020, 8:49:57 PM10/26/20
to Racket Users

I'm reading the documentation about formatted output where it says:
~a or ~A displays the next argument
~s or ~S writes the next argument
~v or ~V prints the next argument

I can't help thinking these would be more intuitive if they were spelled ~d, ~w, and ~p.

Perhaps I can remember them better if someone could explain where the letters come from.  Can anyone explain?


Sorawee Porncharoenwase

unread,
Oct 26, 2020, 8:59:42 PM10/26/20
to primer, Racket Users
I had this question too. It looks like they are inherited from Scheme.

~a = any
~s = s-expression


There's no ~v. IIUC, there's no `print` in Scheme.

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/979731d3-0a48-484c-8269-f10a807fe6aan%40googlegroups.com.

Sam Tobin-Hochstadt

unread,
Oct 26, 2020, 9:01:35 PM10/26/20
to Sorawee Porncharoenwase, primer, Racket Users
That page actually suggests they're inherited from Common Lisp, which
seems very likely (and probably from some other Lisp before that).

Sam
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CADcuegvoXQCZDCJhwZa9rfvJrfWWw6OfvMy9atpvpx2vggnJDA%40mail.gmail.com.

Robby Findler

unread,
Oct 26, 2020, 9:21:49 PM10/26/20
to Sam Tobin-Hochstadt, Racket Users, Sorawee Porncharoenwase, primer
v is for "value" I believe. 

Robby

Reply all
Reply to author
Forward
0 new messages