-- File [Ivy]<Nelson>Lupine>LupineTimeTestImpl.mesa.
-- Last edited by BZM on  2-Mar-82 20:57:04.


DIRECTORY
    LupineTimeTest --USING [ALL]--;


LupineTimeTestImpl: PROGRAM
  EXPORTS LupineTimeTest
  = BEGIN OPEN LupineTimeTest;


  Null: PUBLIC PROC = {NULL};

  One: PUBLIC PROC [one: INTEGER] RETURNS [a: INTEGER] =
      {RETURN[one]};
  Two: PUBLIC PROC [one,two: INTEGER] RETURNS [a,b: INTEGER] =
      {RETURN[one,two]};
  Four: PUBLIC PROC [one,two,three,four: INTEGER]
    RETURNS [a,b,c,d: INTEGER] =
      {RETURN[one,two,three,four]};
  Ten: PUBLIC PROC [one,two,three,four,five,six,seven,eight,nine,ten: INTEGER]
    RETURNS [a,b,c,d,e,f,g,h,i,j: INTEGER] =
      {RETURN[one,two,three,four,five,six,seven,eight,nine,ten]};


  Signal: PUBLIC SIGNAL [in: INTEGER] RETURNS [out: INTEGER] = CODE;

  SignalTest: PUBLIC PROC [in: INTEGER, action: SignalAction]
      RETURNS [--out:-- INTEGER] =
    BEGIN
    SELECT action FROM
      signal  => RETURN[ SIGNAL Signal[in] ];
      error   => RETURN[ ERROR  Signal[in] ];
      neither => RETURN[ in ];
      ENDCASE => ERROR;
    END;


  OneArray: PUBLIC PROC [in: Array1] RETURNS [--out:-- Array1] =
    {RETURN[in]};
  FourArray: PUBLIC PROC [in: Array4] RETURNS [--out:-- Array4] =
    {RETURN[in]};
  TenArray: PUBLIC PROC [in: Array10] RETURNS [--out:-- Array10] =
    {RETURN[in]};
  FortyArray: PUBLIC PROC [in: Array40] RETURNS [--out:-- Array40] =
    {RETURN[in]};
  HundredArray: PUBLIC PROC [in: Array100] RETURNS [--out:-- Array100] =
    {RETURN[in]};


END.  -- LupineTimeTestImpl.



  Old test routines:

  StringCopy: PUBLIC PROC [in: LONG STRING, out: VARString] =
    {IF in # NIL AND out # NIL THEN 
	FOR i: CARDINAL IN [0..in.length) DO out[i] ← in[i] ENDLOOP};
    {IF in # NIL AND out # NIL 
      THEN Inline.LongCOPY[
	to: BASE[out.text],
	from: BASE[in.text],
	nwords: (MIN[in.length, out.maxlength]+1)/Environment.charsPerWord ]};

  StringDescriptor: PROC [
      string: LONG STRING, text: RESULTTextDescriptor] =
    BEGIN
    IF LENGTH[text] # string.length THEN ERROR;
    Inline.LongCOPY[
      to: BASE[text],
      from: @string.text,
      nwords: string.length/Environment.charsPerWord ];
    END;