source: PSPA/madxPSPA/doc/usrguide/Introduction/set.html @ 430

Last change on this file since 430 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 1.9 KB
Line 
1<head>
2<title>SET</title>
3<!-- Changed by: Hans Grote, 09-Jun-2003 -->
4</head>
5
6<body bgcolor="#ffffff">
7
8<center>
9EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH
10<IMG SRC="http://cern.ch/madx/icons/mx7_25.gif" align=right>
11<h2>Set Statements</h2>
12</center>
13
14<pre>
15set,format="...", sequence="...";
16</pre>
17The set command allows 2 actions:
18<h3>1) Format</h3>
19The first command lets you vary the output precision.
20<pre>
21parameter: format = s1, s2, s3
22</pre>
23(up to) three strings defining the integer, floating, and string
24output format for the save, show, value, and table output. The formats
25can be given in any order and stay valid until replaced. The defaults
26are:
27<pre>
28"10d","18.10g","-18s".
29</pre>
30They follow the C convention. The quotes are mandatory. The allowed
31formats are:
32<pre>
33"nd" for integer with n = field width.
34</pre>
35<pre>
36"m.nf" or "m.ng" or "m.ne" for floating, m field width, n precision.
37</pre>
38<pre>
39"ns" for string output.
40</pre>
41The default is "right adjusted", a "-" changes it to "left adjusted".
42
43Example:
44<pre>
45set,format="22.14e";
46</pre>
47changes the current floating point format to 22.14e; the other formats
48remain untouched.
49<pre>
50set,format="s","d","g";
51</pre>
52sets all formats to automatic adjustment according to C conventions.
53<h3>2) Sequence</h3>
54The second command lets you choose the current sequence without having
55to use the "USE" command, which would bring you back to a bare lattice
56without errors. The command only works if the chosen sequence had been
57activated before with the "USE" command, otherwise a warning will be
58issued and MAD-X will continue with the unmodified current sequence.
59This command is particularly useful for commands that do not have the
60sequence as an argument like "EMIT" or "IBS".
61<address>
62<a href="http://www.cern.ch/Hans.Grote/hansg_sign.html">hansg</a>,
63<a href="http://www.cern.ch/Frank.Frank/frs_sign.html">frs</a>,
64June 18, 2003
65</address>
66</body>
67
68
69
70
71
Note: See TracBrowser for help on using the repository browser.