File: changes20.html

package info (click to toggle)
ploticus 2.0.3-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,696 kB
  • ctags: 2,035
  • sloc: ansic: 40,100; perl: 456; sh: 186; makefile: 129
file content (164 lines) | stat: -rw-r--r-- 4,892 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<html>
<head>
<!-- This file has been generated by unroff 1.0, 03/05/02 09:23:31. -->
<!-- Do not edit! -->
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
-->
</STYLE>
<title>ploticus: script syntax changes - version 2.00</title>
<body bgcolor=D0D0EE vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
<td>
  <table cellpadding=2 width=550><tr>
  <td><br><h2>Script syntax changes - version 2.00</h2></td>
  <td align=right>
  <small>
  <a href="../doc/Welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
  <a href="../doc/Welcome.html">Welcome</a> &nbsp; &nbsp;
  <a href="../gallery/index.html">Gallery</a> &nbsp; &nbsp;
  <a href="../doc/Contents.html">Handbook</a> 
  <td></tr></table>
</td></tr>
<td>
<br>
<br>

<title>Manual page for Script_syntax_changes_-_version_2.00(PL)</title>
</head>
<body>

<h2>NEW SCRIPT INTERPRETER</h2>
Ploticus release 2.00 debuts a new underlying script interpreter system,
with some consequent changes in legal script syntax.<tt> </tt>
These changes should be fairly obscure; when I tested on the collection of
gallery examples there were minor problems with 3 or 4 of the examples and these were easily fixed.<tt> </tt>
I appologize in advance for any disruption this may cause.<tt> </tt>
<p>
The following is a summary
of known changes; if you find others, please inform me
(<tt>scg@jax.org</tt>).<tt> </tt>

<p>
<b>Changes that may require maintenance to existing scripts:</b>

<ul>
<li>
Variables no longer need to be <b>#declare</b>d.<tt> </tt>
<b>#declare</b> no longer does anything; if encountered
it will be silently ignored. 
Scripts that depended on <b>#declare</b> to initialize a
variable should now use <b>#set</b> or <b>#setifnotgiven</b> instead.<tt> </tt>
<br>
<br>
<li>
<b>#setifnotgiven</b> should be used to set a default value for any 
variable that may be passed in to the script.  Scripts that use
<b>#declare soft</b>, <b>$exists()</b>, or <b>$notexists()</b> to
handle passed variables should be changed to use <b>#setifnotgiven</b>.<tt> </tt>
<br>
<br>
<li>
References to variables that have never been given a value
cause evaluation to be cancelled, leaving the variable name to appear 
in result, and do not cause an error message to be issued.  
<br>
<br>
<li>
Concatenation of constants and/or variables in <b>#set</b> statements
are now done differently.  You used to be able to do this:
<tt>#set A = /home/scg/data/@TESTRUN </tt>
<br>
Now it must be done this way:
<tt>#set A = "/home/scg/data/" @TESTRUN</tt>
<br>
<br>
<li>
Implicit concatentation of constants and/or variables in an <b>#if</b> statement
is longer supported.  For instance, you used to be able to do this:
<br>
<tt>#if @FILENAME = /home/scg/data/@TESTRUN</tt>
<br>
Now it must be done this way:
<pre>
 #set F = "/home/scg/data/" @TESTRUN
 #if @FILENAME = @F
 ...
</pre>
<li>
<b>#clone</b> no longer accepts a filename argument.  
Use <b>#include</b> and <b>#procdef</b> instead.<tt> </tt>
<br>
<br>
<li>
The <b>$change()</b> function no longer supports the special symbol <tt>space</tt>.<tt> </tt>
A space may be represented naturally, eg <tt>$change( "_", " ", @FOO )</tt>
<br>
<br>
<li>
The <b>$validate()</b> function is no longer supported.<tt> </tt>
Scripts should use $isnumber() to test numbers, 
$datevalid() to test date values, 
and $timevalid() to test time values.<tt> </tt>
<br>
<br>
<li>
Trailing comments may cause errors where they didn't before.<tt> </tt>
This line contains a trailing comment:
<pre>
	rectangle: 1 1 5 6.5    //xlo, ylo, xhi, yhi
</pre>
The documentation has always stated that "any line beginning with a double slash (//)
is taken as a comment", however some of the examples may have used trailing
comments.  When in doubt don't use them.  <i>(added Oct 2 '01)</i>

<br><br><br>

</ul>
<p>
<b>Changes that should not affect existing scripts:</b>

<ul>
<li>
<b>#if</b> statements support quoted operands,
useful for constants that have embedded white space.<tt> </tt>
Example: <tt>#if @A = "hello world"</tt>
<br>
<br>
<li>
Function constructs may now contain embedded spaces, and quoted arguments.<tt> </tt>
Exceptions are <b>$arith()</b> and <b>$arithl()</b>, which do not allow
embedded spaces within the arithmetic expression.<tt> </tt>
<br>
<br>
<li>
<b>#hideund</b> and <b>#showund</b> directives are no longer necessary, 
and are silently ignored.<tt> </tt>


<br>
<br>
</td></tr>
<td align=right>
<a href="../doc/Welcome.html">
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine &nbsp; <br>
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
<br>
<br>
<center>
<img src="../gallery/all.gif">
</center>
</td></tr>
</table>

</ul>
<p><hr>
Markup created by <em>unroff</em> 1.0,&#160;<tt> </tt>&#160;<tt> </tt>March 05, 2002.
</body>
</html>