Denso RC5 Specifications Page 503

  • Download
  • Add to my manuals
  • Print
  • Page
    / 692
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 502
Chapter 15 Functions
15-55
f : Converts a real type argument to a character string of decimals
displayed in a “[-] ddd.ddd” format. The number of digits after the
decimal point is determined by the designated precision. If the
precision is not designated, the number of digits after the decimal point
is 6. If the precision is 0 and a # flag is not designated, the characters
after the decimal point are not displayed. If characters after the
decimal point are displayed, at least one digit before the decimal point
is displayed. The value is rounded to a proper number of digits.
e, E : Convert a real type argument to a character in a “[-] d.ddde+/-dd”
format. One digit (other than 0 if the argument is not 0) is displayed
before the decimal point character. The number of digits after the
decimal point is determined according to the designated precision. If
the precision is not designated, the number of digits after the decimal
point is 6. If the precision is 0 and a # flag is not designated, the
characters after the decimal point are not output. The value is
rounded to a proper number of digits. If the conversion designation
symbol E is used, the exponent is expressed not with e but E. The
exponent is always expressed with 2 digits or more. If the value is 0,
the exponential part also becomes 0.
g, G : Convert a real type argument to a type of f or e (In the case of G, E is
used). The valid number of digits depends on the precision. If the
precision is 0, the valid number of digits is 1. The format used is
determined by the value to be converted. Conversion of type e (or E)
is used only when the exponential part of the conversion result is less
than -4, or greater than or equal to the precision. If there is a 0 as the
last digit after the decimal point, it is deleted. Figures with a decimal
point are displayed only when there is a digit after the decimal point.
C : Converts an integer type argument to an ASCII character byte and
outputs the characters after conversion.
S : System reservation
% : Outputs a character of %. The argument is not converted. The
designation of complete conversion is %%.
There is no regulation for operation if the conversion designation is wrong.
If the result of conversion is longer than the field width, it may be cut it short but
the field is never extended with the conversion result.
Related Terms
HEX$, STR$
Example
S1 = SPRINTF$("% d",123) 'Assigns "123" to S1.
S2 = SPRINTF$("%-6.3f", 1.23) 'Assigns "1.230 " to S2.
S3 = SPRINTF$("%e",123.456#) 'Assigns "1.234560e+002" to S3.
S4 = SPRINTF$("%g",12345678#) 'Assigns "1.23457e+007" to S4.
S5 = SPRINTF$("%#x",128) 'Assigns "0x80" to S5.
Page view 502
1 2 ... 498 499 500 501 502 503 504 505 506 507 508 ... 691 692

Comments to this Manuals

No comments