Differences
This shows you the differences between two versions of the page.
ftoc_-_a_fahrenheit_to_celsius_converter [2011/12/16 22:24] thomaslocke [A new line, an exit strategy, and a step] |
ftoc_-_a_fahrenheit_to_celsius_converter [2012/03/06 22:20] (current) cvanvliet fixed a few grammar erros |
||
---|---|---|---|
Line 196: | Line 196: | ||
The //Fahr// variable is of the //Fahrenheit_Degree_Range// type and it's initial value is 0. Why 0? Because we assign it the value //Fahrenheit_Degree_Range'First//, and the //'First// part equals the first value in the range constraint of the type, in this case 0. Consequently the value for //Fahrenheit_Degree_Range'Last// is 212. | The //Fahr// variable is of the //Fahrenheit_Degree_Range// type and it's initial value is 0. Why 0? Because we assign it the value //Fahrenheit_Degree_Range'First//, and the //'First// part equals the first value in the range constraint of the type, in this case 0. Consequently the value for //Fahrenheit_Degree_Range'Last// is 212. | ||
- | Lets take a look at the final three object declarations: | + | Let's take a look at the final three object declarations: |
<code ada> | <code ada> | ||
Line 272: | Line 272: | ||
The //'Width// attribute returns the maximum width of the type, so if we change the //Fahrenheit_Degree_Range// later on, we wouldn't have to do a single thing about this call to //Put//; it would simply adjust itself accordingly. | The //'Width// attribute returns the maximum width of the type, so if we change the //Fahrenheit_Degree_Range// later on, we wouldn't have to do a single thing about this call to //Put//; it would simply adjust itself accordingly. | ||
- | Lets do some tests with various //Width// parameters: | + | Let's do some tests with various //Width// parameters: |
<code ada> | <code ada> | ||
Line 347: | Line 347: | ||
The //Fore// parameter gives the minimum character count necessary to output the value preceding the decimal point. As with //Width// for the integer types, //Fore// will automatically expand if necessary. //Aft// sets the precision after the decimal point, in this case 2. And finally //Exp// sets the exponent field size. A value of //Exp => 0// signifies that no exponent will be output. Anything other than zero will output the exponent symbol "E", a +/-, and the digit(s) of the exponent. Note: The value of //Exp// should not be less than zero! | The //Fore// parameter gives the minimum character count necessary to output the value preceding the decimal point. As with //Width// for the integer types, //Fore// will automatically expand if necessary. //Aft// sets the precision after the decimal point, in this case 2. And finally //Exp// sets the exponent field size. A value of //Exp => 0// signifies that no exponent will be output. Anything other than zero will output the exponent symbol "E", a +/-, and the digit(s) of the exponent. Note: The value of //Exp// should not be less than zero! | ||
- | Lets try a few different combinations: | + | Let's try a few different combinations: |
<code ada> | <code ada> |