Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!bouma From: bouma@cs.purdue.EDU (William J. Bouma) Newsgroups: comp.lang.forth Subject: Re: alternate number syntax Message-ID: <9308@medusa.cs.purdue.edu> Date: 18 Jan 90 18:03:07 GMT Organization: Department of Computer Science, Purdue University Lines: 22 >See? Everybody has his own pet scheme. I could live with just about >any reasonable scheme, but so far there have been as many proposed >schemes as there are people, and there don't seem to be any compelling >arguments to choose between them. "looks ugly" is pretty subjective. > >Heavy sigh, >Mitch As usual, I like the way LISP deals with this. LISP has a general "dispatching character" which is #. # is followed by a number (optionally) and a single character which is used to determine which function to run. 'r' is used for radix dispatching, so a binary number could be specified #2r10110. Imagine FORTH had such facility. One could define an octal dispatching function something like this: : #o base @ 8 base ! word number swap base ! ; Such a facility can be useful for much more than just number conversion. -- Bill || ...!purdue!bouma