Articles Archive
Director Forums
Director Wiki
Job Board
Search
 
 Director Online WikiMain Page | About | Help | FAQ | Special pages | Log in | Printable version | Disclaimers

WikiScript

From Director Online Wiki

on WikiScript(aScript) -----------------------------------------------
  -- INPUT: <aScript> should be a string or a script member, or the
  --         name or number of a script member
  -- OUTPUT: Returns a string with a space before each line so that
  --         the string will appear as pre-formatted text in DougWiki
  --------------------------------------------------------------------
 
  case ilk(aScript) of
    #string:
      -- continue
     
    #member:
     return WikiScript(aScript.scriptText)
     
    #integer, #string:
      return WikiScript(member(aScript))
     
    otherwise
      return "String or script member expected"
  end case
 
  i = the number of lines of aScript
  repeat while i
    if the number of words of line i of aScript then
      put " " before line i of aScript
    end if
   
    i = i - 1
  end repeat
 
  return aScript
end WikiScript

Retrieved from "http://www.director-online.com/dougwiki/index.php/WikiScript"

This page has been accessed 5355 times. This page was last modified 06:42, 9 Jun 2005.