Skip to content

Commit

Permalink
Made pp() return a debug statement instead of a string to be debugged…
Browse files Browse the repository at this point in the history
…. Made pp() not print the multiline decoration when we only had one line of stuff to print. (Inefficiently.)
  • Loading branch information
DDR0 committed Jan 6, 2013
1 parent 8faa64f commit ab3b3af
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions data/functions.cfg
Expand Up @@ -336,10 +336,12 @@
{
name: "pp", //pretty-printing function.
args: "input",
formula: "if(not strstr(pretty, '\n'),
_pp(input, 0),
'\n\n\n\n===OUTPUT===\n\n' + pretty + '\n===FINISHED===\n\n\n\n')
where pretty = _pp(input, 0)",
formula: "debug(
if(not strstr(pretty, '\n'),
pretty,
'\n\n\n\n===OUTPUT===\n\n' + pretty + '\n\n===FINISHED===\n\n\n\n'
) where pretty = flex_sum(if(last(cp)='\n', cp[0:size(cp)-1], cp) where cp = split(_pp(input, 0), ''), '')
)",
},
//pp(find(get_save_document(0).character, value.is_human).vars.saved_maps)
Expand Down

0 comments on commit ab3b3af

Please sign in to comment.