Paste number 48341: Macro help

Paste number 48341: Macro help
Pasted by: |Agent
1 year, 2 weeks ago
#dylan | Context in IRC logs
Paste contents:
Raw Source | XML | Display As
This macro can be used no problem:

define macro with-dbms
  { with-dbms(?dbms:expression) ?body:* end }
    => { dynamic-bind (*default-dbms* = ?dbms)
           ?body
         end; }
end macro with-dbms;


But this macro can't be used—the compiler reports "Error: Syntax error in 'dynamic-bind' statement.  None of the main rules matched."

define macro with-dbms
  { with-dbms(?dbms:expression) ?body:* end }
    => { dynamic-bind (*default-dbms* = ?dbms)
           ?body ;
           close-dbms(*default-dbms*)
         end; }
end macro with-dbms;

This paste has no annotations.

Colorize as:
Show Line Numbers

Ads absolutely not by Google

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.