1 | <head> |
---|
2 | <title>SET</title> |
---|
3 | <!-- Changed by: Hans Grote, 09-Jun-2003 --> |
---|
4 | </head> |
---|
5 | |
---|
6 | <body bgcolor="#ffffff"> |
---|
7 | |
---|
8 | <center> |
---|
9 | EUROPEAN 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> |
---|
15 | set,format="...", sequence="..."; |
---|
16 | </pre> |
---|
17 | The set command allows 2 actions: |
---|
18 | <h3>1) Format</h3> |
---|
19 | The first command lets you vary the output precision. |
---|
20 | <pre> |
---|
21 | parameter: format = s1, s2, s3 |
---|
22 | </pre> |
---|
23 | (up to) three strings defining the integer, floating, and string |
---|
24 | output format for the save, show, value, and table output. The formats |
---|
25 | can be given in any order and stay valid until replaced. The defaults |
---|
26 | are: |
---|
27 | <pre> |
---|
28 | "10d","18.10g","-18s". |
---|
29 | </pre> |
---|
30 | They follow the C convention. The quotes are mandatory. The allowed |
---|
31 | formats 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> |
---|
41 | The default is "right adjusted", a "-" changes it to "left adjusted". |
---|
42 | |
---|
43 | Example: |
---|
44 | <pre> |
---|
45 | set,format="22.14e"; |
---|
46 | </pre> |
---|
47 | changes the current floating point format to 22.14e; the other formats |
---|
48 | remain untouched. |
---|
49 | <pre> |
---|
50 | set,format="s","d","g"; |
---|
51 | </pre> |
---|
52 | sets all formats to automatic adjustment according to C conventions. |
---|
53 | <h3>2) Sequence</h3> |
---|
54 | The second command lets you choose the current sequence without having |
---|
55 | to use the "USE" command, which would bring you back to a bare lattice |
---|
56 | without errors. The command only works if the chosen sequence had been |
---|
57 | activated before with the "USE" command, otherwise a warning will be |
---|
58 | issued and MAD-X will continue with the unmodified current sequence. |
---|
59 | This command is particularly useful for commands that do not have the |
---|
60 | sequence 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>, |
---|
64 | June 18, 2003 |
---|
65 | </address> |
---|
66 | </body> |
---|
67 | |
---|
68 | |
---|
69 | |
---|
70 | |
---|
71 | |
---|