Ann: interpolate pack
Michael Hendricks <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CAFHuXua2HhdXDZfdTzcsVMdUE2kC5q7s8Ef7YZpkerPhKwUSfg@mail.gmail.com> |
With Jan's 6.5.1 release, I thought I'd put
prolog_load_context(variable_names,_) through its paces. I've release a
pack that implements shell-style string interpolation for Prolog. You can
read the full documentation<http://www.swi-prolog.org/pack/list?p=interpolate>for
details. It's pretty much what you'd expect:
Name = "Michael",
Valediction = 'Goodbye, $Name'
Interpolation works inside atoms, double quoted strings and backquoted
strings. Of course, you often get singleton warnings, so I'll probably
implement a quasiquotation variant at some point.
--
Michael
-------------- next part --------------
HTML attachment scrubbed and removed