File mttroot/mtt/bin/trans/make_stdin artifact a651c6c513 part of check-in c06f6cb5a8


#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

## 	$Id$	

# Copyright (C) 1999 by Peter J. Gawthrop

# Tell user
Sys=$1
lang=$2
date=`date`
Nu=`grep "MTTNu " <$Sys\_def.r | awk '{print $3}' | sed 's/;//'`
echo  "Creating $1_input.$2 for standard input"

cat <<EOF > $1_input.$2 
PROCEDURE $1_input(VAR mttu : InputVector;
                       mttt : REAL;
                       mttx : StateVector;
                       mtty : OutputVector);

{Created by MTT on $date for standard input to simulation}

VAR t : REAL;

BEGIN{$1_input}
  read(t); { Read, and discard, first column (time) }
  FOR mtti:=1 TO $Nu DO {Read the inputs}
     read(mttu[mtti]);
  readln; {Next line}
END{$1_input};
EOF

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]