File mttroot/mtt/bin/trans/make_stdin artifact 506a71f422 part of check-in 1b7f8cc0fb


#! /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; Start:BOOLEAN;

BEGIN{$1_input}
  {Zap comments}
  IF (input^ = chr("#")) THEN
  BEGIN
    readln;
    WHILE (input^ = chr("#")) DO readln;
  END;

  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 ]