Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Curl macros introduction (part 1)
08-10-2011, 05:57 AM,
#3
RE: Curl macros introduction (part 1)
When passed a String identifier, all of these variants have the same effect (the proc is the clue that these simple macros are examples only):
Code:
{define-proc {up s:String}:String
    {return {s.to-upper-clone}}
}

{define-macro public {uc ?txt:text}
    {return {expand-template {up ?txt}}}
}

{define-macro public {ucv ?txt:verbatim}
    {return {expand-template {up ?txt}}}
}

{define-macro public {uctk ?txt:token}
    {return {expand-template {up ?txt}}}
}

{define-macro public {uce ?txt:expression}
    {return {expand-template {up ?txt}}}
}

{define-macro public {ucs ?txt:statement}
    {return {expand-template {up ?txt}}}
}

when called as
Code:
{def str:String = "testing macros"}

{uc   str}
{br}
{ucv  str}
{br}
{uctk str}
{br}
{uce  str}
{br}
{ucs  str}
Robert Shiplett, Curlr
Fredericton NB

Canada
Reply


Messages In This Thread
RE: Curl macros introduction (part 1) - by RobertShiplett - 08-10-2011, 05:57 AM

Possibly Related Threads...
Thread Author Replies Views Last Post
  server-side Curl issue : TocDocument RobertShiplett 3 5,691 02-09-2015, 02:11 PM
Last Post: Sumeraxe
  Curl with HTML widget + CintaNotes RobertShiplett 0 4,444 09-08-2014, 07:42 AM
Last Post: RobertShiplett
  Curl for the new Kodansh kanji books RobertShiplett 0 3,032 09-07-2014, 08:51 PM
Last Post: RobertShiplett
  Curl on Facebook - another page RobertShiplett 0 3,737 02-01-2014, 02:29 AM
Last Post: RobertShiplett
  Curl for CoffeeScript folks RobertShiplett 0 4,758 06-29-2013, 02:52 AM
Last Post: RobertShiplett
  Curl JavaScript bytecodes RobertShiplett 0 4,939 06-19-2013, 10:33 PM
Last Post: RobertShiplett
  jinja2 templates for Curl RobertShiplett 0 4,147 06-14-2013, 08:33 AM
Last Post: RobertShiplett
  Curl and QNX RobertShiplett 0 4,932 04-24-2013, 11:38 PM
Last Post: RobertShiplett
  WikizPad Curl personal wiki RobertShiplett 0 4,115 03-11-2013, 01:09 AM
Last Post: RobertShiplett
  Curl as flashcard markup RobertShiplett 1 4,819 03-09-2013, 01:58 AM
Last Post: RobertShiplett
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('195')