Skip to content

000F picat run

Dmitry Ponyatov edited this page Nov 26, 2019 · 2 revisions

000F picat run

picat can work both in batch and dialog modes:

batch mode: run from the command line without parameters

$ picat hello.pi
Hello World

hello.pi

main =>
    println("Hello World").

batch mode: run from the command line without parameters

$ picat hello.pi with some parameters
*** Undefined procedure: main/1

This error means that procedure main/1 must be defined with 1 parameter:

main(Args) =>
    printf("Hello with: %w\n",Args).
$ picat hello.pi with some parameters
Hello with: [with,some,parameters]

interactive mode: commands should be entered manually line by line

$ picat
Picat 2.7b12, (C) picat-lang.org, 2013-2019.
Type 'help' for help.
Picat> println("Iteractive Hello")
Iteractive Hello

yes

Picat> _

Next: