演習 1 : 最初のデータ入力ルーチン
-
スタジオを開始し、SAMPLES ネームスペースで新規のルーチンを作成します。
-
以下の ObjectScript を入力します。
mydatent ; first data entry routine read !, "Name: " , name if name="" {quit } ; user entered nothing read !, "Phone: ", phone read !, "DOB: ", dob write !! display ; display the data write !, "Name:", ?20, name write !, "Phone:", ?20, phone write !, "DOB:", ?20, dob quit
-
[ファイル]→[保存] をクリックします。
-
ファイル名に mydatent を指定し、[ファイルの種類] フィールドで “Macro Routine” を指定します。[名前を付けて保存] をクリックします。次に、[ビルド]→[コンパイル] をクリックして、ルーチンをコンパイルします。
-
ターミナルを開始し、SAMPLES ネームスペースで do ^mydatent と入力してルーチンを実行します。