Campbell-scientific CR9000X Measurement and Control System Uživatelský manuál Strana 400

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 442
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 399
Section 11. String Functions
FormatFloat (Float, FormatString)
Converts a floating point value into a string.
Syntax
String = FormatFloat (Float, FormatString)
Remarks
The string conversion of the floating point value is formatted based on the
FormatString. Total field width includes decimal point and sign.
Other ASCII characters can be included in the FormatString.
(example: FormatFloat(Variable,"The current reading is %2.3G")
Parameter
& Data Type
Enter
FORMATFLOAT PARAMETERS
Float
Variable or
constant
The Float parameter is the variable or constant that holds the floating point
value to be converted.
Option
Constant as
String
The FormatString determines how the floating point value will be represented
in the converted string. Note that the format string must be enclosed in quotes.
The options are (m = mantissa; d = decimal; x = exponent):
Option
"%e" Decimal notation in the form of +m.dddddd e+xx; precision is 6
places to the right of the decimal.
"%f"
D
ecimal notation in the form of +mmm.dddddd; p
r
ecision is 6
p
laces to the right of the decimal.
"%g"
M
antissa and decimal are variable; trailing 0s and decimals are
o
mitted.
"%Y.Zf"
D
ecimal notation in the form of +m.d; precision is defined by Y
p
laces to the left of the decimal and Z places to the right of decimal.
"%Ye"
D
ecimal notation in the form of +m.d e+xx; precision is defined by
Y
characters to the right of the decimal
"%Yg"
M
antissa and decimal are variable; precision is defined by Y
InStr (Start, SearchStr, SoughtString, SearchOption )
The InStr instruction is used to find the location of a string within a string.
Syntax
Variable = InStr (Start, SearchString, SoughtString, SearchOption )
Remarks
This instruction returns the integer position of the SoughtString parameter. If
the SoughtString is not found, the instruction returns 0.
11-4
Zobrazit stránku 399
1 2 ... 395 396 397 398 399 400 401 402 403 404 405 ... 441 442

Komentáře k této Příručce

Žádné komentáře