1
module Hello
{
    config const message: string = "Hello, world!";
    proc main()
    {
        writeln( message );
    }
}

The program compiles fine with no errors, but my attempt to run gives the following errors.

./hello2-module.chpl: line 1: module: command not found
./hello2-module.chpl: line 4: syntax error near unexpected token `('
./hello2-module.chpl: line 4: ` proc main()'

Something is not right.

ytobi
  • 535
  • 1
  • 9
  • 19

1 Answers1

3

You don't indicate how you are trying to run the generated executable, but from the output you show, it appears that you might be trying to run the Chapel source file (e.g., ./hello2-module.chpl) rather than the compiler-generated executable (e.g., ./Hello with a recent version of Chapel or ./a.out with an older one).

Brad
  • 3,839
  • 7
  • 25