empirical-soft / empirical-lang

A language for time-series analysis
https://www.empirical-soft.com/
Other
168 stars 13 forks source link

Add exit() and argv #71

Closed chrisaycock closed 4 years ago

chrisaycock commented 4 years ago

We want to take command-line arguments.

if len(argv) == 1
  print("Incorrect number of arguments")
  exit(1)
end

argv must be constructed before invoking the user's file. As for exit(), that must cause Empirical to return the desired code.