Home | History | Annotate | Download | only in cs
      1 <?cs def:getWidthStyle(width, output) ?>
      2   <?cs set:output = "style='width:" + width + "px;'" ?>
      3 <?cs /def ?>
      4 
      5 Testing "pass by reference" to macro calls so they can "return" data
      6 
      7 Testing non-existant var
      8 <?cs call:getWidthStyle(100, attr) ?>
      9 <?cs var:attr ?>
     10 
     11 Testing non-existant var sub var
     12 <?cs call:getWidthStyle(300, attr2.foo) ?>
     13 <?cs var:attr2.foo ?>
     14 
     15 Testing non-existant sub var
     16 <?cs call:getWidthStyle(400, attr.foo) ?>
     17 <?cs var:attr.foo ?>
     18 
     19 Testing existant var
     20 <?cs set:attr3 = "" ?>
     21 <?cs call:getWidthStyle(200, attr3) ?>
     22 <?cs var:attr3 ?>
     23