2 ***********************************************************
3 $SNARK_Header: S N A R K 1 4 - A PICTURE RECONSTRUCTION PROGRAM $
4 $HeadURL: svn://dig.cs.gc.cuny.edu/snark/trunk/src/snark/mode.cpp $
5 $LastChangedRevision: 80 $
6 $Date: 2014-07-01 21:01:54 -0400 (Tue, 01 Jul 2014) $
8 ***********************************************************
10 SETS THE CONSTRAINT MODE PARAMETERS IN USER COMMON.
12 LOFL - LOWER CONSTRAINT FLAG
13 LOWER- LOWER CONSTRAINT VALUE
14 UPFL - UPPER CONSTRAINT FLAG
15 UPPER- UPPER CONSTRAINT VALUE
36 static const INTEGER mode_codes[2] =
37 { CHAR2INT('l', 'o', 'w', 'e'), CHAR2INT('u', 'p', 'p', 'e') };
42 word = InFile.getwrd(FALSE, &eol, mode_codes, 2);
46 if (word == mode_codes[0])
49 Modefl.lower = InFile.getnum(FALSE, &eol);
53 fprintf(output, "\n **** value after keyword LOWER can not be found\n **** program aborted\n");
59 if (word == mode_codes[1])
62 Modefl.upper = InFile.getnum(FALSE, &eol);
67 "\n **** value after keyword UPPER can not be found\n **** program aborted\n");
72 word = InFile.getwrd(FALSE, &eol, mode_codes, 2);
76 //if both flags ('Modefl.lofl' & 'Modefl.upfl') are set to TRUE, but lower
77 //constraint ('Modefl.lower') was given a value greater than that given to upper constraint
78 //('Modefl.upper'), then output complaint to user and exit execution of snark05 (with exit code 111)
79 if (Modefl.lofl && Modefl.upfl)
81 if (Modefl.lower > Modefl.upper)
84 "\n **** LOWER must not be greater than UPPER\n **** program aborted\n");
91 fprintf(output, "\n lower constraint set to %9.4f", Modefl.lower);
96 fprintf(output, "\n upper constraint set to %9.4f", Modefl.upper);