Tuesday, July 05, 2005

Default Values for Multiple Parameters

OK you can now specify default values for your parameters (syntax suggested by Christopher Church). Continuing our pizza example, here we specify the default "what" to be "tennis shoes", and the default "where" to be "Washington, DC":
http://www.google.com/local?sc=1&hl=en&q=${what=tennis shoes}&near=${where=Washington, DC}&btnG=Google+Search&rl=1
Now if the user does not specify a "what"...
gloc -where Poughkeepsie, NY
...it will default to "tennis shoes" and they will be taken to...
http://www.google.com/local?sc=1&hl=en&q=tennis+shoes&near=Poughkeepsie%2C+NY&btnG=Google+Search&rl=1
Similarly, if they do not specify a "where", it will default to "Washington, DC".

2 Comments:

Blogger JeremyHussell said...

Good work on default parameter values.

Someone already mentioned this, but I think it's worth repeating: the more improvements you make to command syntax, the more I want to update (or in some cases delete) the old commands I made.

BTW, you should update the "Upcoming features" page. Or, possibly, delete it, since this blog and the Google Group seem to be pretty effective, and the list of links at the bottom of the page is getting a little crowded.

7/08/2005 8:19 a.m.  
Blogger Jonathan said...

Jeremy - Good idea about dropping the Upcoming Features page. I will add it to my action list.

7/11/2005 11:03 p.m.  

Post a Comment

<< Home