~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to prim/help/return.mlq

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
% @(#)return.mlq        19.1 (ESO-IPG) 02/25/03 14:03:41 
 
2
\rightpage
 
3
\noqualifier
 
4
\se
 
5
SECTION./
 
6
\es\co
 
7
RETURN                                                  14-JAN-1987  KB
 
8
\oc\su
 
9
RETURN [par1] [par2] [par3]
 
10
        return to calling procedure (or terminal) 
 
11
\us\pu
 
12
Purpose: 
 
13
          Return to calling procedure (or terminal) and pass up to 3 parameters
 
14
          back.
 
15
\up\sy
 
16
Syntax:  
 
17
          RETURN [par1] [par2] [par3]
 
18
\ys\pa
 
19
          par1 = string which will be stored in the character keyword Q1
 
20
\ap\pa
 
21
          par2 = string which will be stored in the character keyword Q2
 
22
\ap\pa
 
23
          par3 = string which will be stored in the character keyword Q3
 
24
\ap\sa
 
25
See also:
 
26
          Chapter 3 in the MIDAS Users Manual, Volume A
 
27
\as\no
 
28
Note: 
 
29
          This is a clean way of passing parameters back to the calling
 
30
          procedure and an alternative to using global keywords.
 
31
\\
 
32
          Use RETURN/EXIT to force control back to the terminal, i.e. stop
 
33
          procedure at any level
 
34
\on\exs
 
35
Examples:
 
36
\ex
 
37
          Suppose we have two MIDAS procedures, proc1.prg and proc2.prg.
 
38
\\
 
39
          Code of proc1.prg:
 
40
\\
 
41
             @@ proc2                           !call proc2.prg
 
42
\\
 
43
             write/out Q1 = {q1}
 
44
\\
 
45
\\
 
46
          Code of proc2.prg:
 
47
\\
 
48
             return moctezuma                   !return to calling procedure
 
49
\\
 
50
\\
 
51
          Then executing proc1.prg via @@ proc1 would yield:
 
52
\\
 
53
             Q1 = moctezuma
 
54
\xe \sxe