1つのファイルで構成されたプログラムのひな形

次に示すコードは1つのファイルで構成された ATS プログラムのひな形です。 またこのひな形は オンライン からも入手できます。

(* ** ** A template for single-file ATS programs ** *) (* ****** ****** *) // #include "share/atspre_define.hats" #include "share/atspre_staload.hats" // (* ****** ****** *) // // please write you program in this section // (* ****** ****** *) implement main0 () = () // a dummy implementation for [main]

#include キーワードではじまる行は ATS コンパイラ atsopt に対して、 指定した外部ライブラリパッケージと様々なライブラリ関数へのアクセスを可能にします。 ATS のライブラリ使用方法はこの本の別の章で説明します。