Why there is a (') prefix on "default" and "current"?

John Ralls jralls at ceridwen.us
Sat Apr 24 10:09:48 EDT 2010


On Apr 24, 2010, at 1:36 AM, Dancefire wrote:

> Hi,
> 
> When I translate for string
> -----
> A list of directories (strings) indicating where to look for html and
> parsed-html files. Each element must be a string representing a
> directory or a symbol where 'default expands to the default path, and
> 'current expands to the current value of the path.
> -----
> in src/scm/command-line.scm
> 
> I first thought, it's single quote for string 'default expands to the
> default path, and '. But then, I realized it's not. It looks like a
> prefix of word "default" and "current". So, is there any special
> meaning of it? or a typo?
> 

It's a language element of Scheme indicating that the identifier is an identifier, which in Scheme is called a "symbol". Strings in Scheme are surrounded with double quotes: "a string". One can define a symbol to refer to a string: (define string "a string") and would afterwards use it with the leading single quote (print 'string).

Regards,
John Ralls



More information about the gnucash-devel mailing list