Skip to content

Commit

Permalink
Build System: Added automatic build file
Browse files Browse the repository at this point in the history
You need to define main/0 where you compute the solution and
you also print it. For example:

  main :- compute(input, Solution), writef('%t\n', [Solution]).

Then, while inside the Prolog file, just hit Ctrl+B to run
automatic build.

Signed-off-by: Iulius Curt <iulius.curt@gmail.com>
  • Loading branch information
iuliux committed Nov 19, 2012
1 parent 582dda9 commit 264b0a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Prolog.sublime-build
@@ -0,0 +1,6 @@
{
"cmd": ["swipl", "-f", "$file_name", "-t", "main", "--quiet"],
"working_dir": "$file_path",
"file_regex": "^Warning: (.+):([0-9]+)",
"selector": "source.prolog"
}

0 comments on commit 264b0a5

Please sign in to comment.