% @(#)return.mlq 17.1.1.1 (ESO-IPG) 01/25/02 17:43:54 \rightpage \noqualifier \se SECTION./ \es\co RETURN 14-JAN-1987 KB \oc\su RETURN [par1] [par2] [par3] return to calling procedure (or terminal) \us\pu Purpose: Return to calling procedure (or terminal) and pass up to 3 parameters back. \up\sy Syntax: RETURN [par1] [par2] [par3] \ys\pa par1 = string which will be stored in the character keyword Q1 \ap\pa par2 = string which will be stored in the character keyword Q2 \ap\pa par3 = string which will be stored in the character keyword Q3 \ap\sa See also: Chapter 3 in the MIDAS Users Manual, Volume A \as\no Note: This is a clean way of passing parameters back to the calling procedure and an alternative to using global keywords. \\ Use RETURN/EXIT to force control back to the terminal, i.e. stop procedure at any level \on\exs Examples: \ex Suppose we have two MIDAS procedures, proc1.prg and proc2.prg. \\ Code of proc1.prg: \\ @@ proc2 !call proc2.prg \\ write/out Q1 = {q1} \\ \\ Code of proc2.prg: \\ return moctezuma !return to calling procedure \\ \\ Then executing proc1.prg via @@ proc1 would yield: \\ Q1 = moctezuma \xe \sxe