File: rvexample3.htm

package info (click to toggle)
extrema 4.3.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,212 kB
  • ctags: 6,452
  • sloc: cpp: 86,428; sh: 8,229; makefile: 814
file content (52 lines) | stat: -rw-r--r-- 1,291 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<HTML>
<HEAD>
<TITLE>Example 3</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<P><font size="+3" color="green"><B>Example 3</B></font></P>

<TABLE border="0" width="548">
<TR>
<TD width="29%"></TD>
<TD width="71%" valign="top">The macro below reads data into vectors allowing</TD>
</TR><TR>
<TD valign="top"><CODE>DUM.DAT</CODE> is below</TD>
<TD valign="top">the user to choose when to stop reading</TD>
</TR><TR>
<TD valign="center">
<CODE>---------------</CODE></TD>
<TD valign="center">
<CODE>---------------------------------------------</CODE></TD>
</TR><TR>
<TD valign="top"><CODE>
10 20 30<br />
40 50 60<BR />
70 80 90<BR />
this is a test<BR />
100 200 300<BR />
400 500 600<BR />
700 800 900<BR />
test line two<BR />
-10 -20 -30<BR />
-40 -50 -60<BR />
-70 -80 -90</CODE></TD>
<TD valign="top"><font color="blue"><CODE>
LNUM = 1<BR />
START:<BR />
READ DUM.DAT\LNUM X Y Z<BR />
IF ~EXIST('X') THEN GOTO DONE  ! end of file<BR />
LIST X Y Z<BR />
ANS='Y'<BR />
INQUIRE 'read again ? (Y|n)' ANS<BR />
IF NES(UCASE(ANS),'Y') THEN GOTO DONE<BR />
LNUM = LEN(X)+LNUM+1<BR />
GOTO START<BR />
DONE:</CODE></font></TD>
</TR>
</TABLE>
<P>
 <a href="rvexample2.htm"><img src="../../shadow_left.gif">&nbsp;
 <font size="+1" color="olive">Example 2</font></a></P>
</BODY>
</HTML>