Campbell-scientific CR3000 Micrologger Instrukcja Użytkownika Strona 505

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 504
Appendix A. CRBasic Programming Instructions
505
A.7 String Functions
Read More! See String Operations (p. 241)
& Concatenates string variables.
+ Concatenates string and numeric variables.
- Compares two strings, returns zero if identical.
A.7.1 String Operations
String Constants
Constantstringscanbeusedinexpressionsusingquotationmarks.For
example:
FirstName = "Mike"
String Addition
Stringscanbeconcatenatedusingthe'+'operator.Forexample:
FullName = FirstName + " " + MiddleName + " " + LastName
String Subtraction
String1String2resultsinanintegerintherangeof255..+255.
String Conversion to/from Numerics
Conversionofstringstonumericsandnumericstostringsisdone
automaticallywhenanassignmentismadefromastringtoanumericor
anumerictoastring,ifpossible.
String Comparison Operators
Thecomparisonoperators=,>,<,<>,>=and<=operateonstrings.
Str
ing Output Processing
TheSample()instructionwillconvertdatatypesifthesourcedatatype
isdifferentthantheSample()datatype.Stringsaredisallowedinall
outputprocessinginstructionsexceptSample().
A.7.2 String Commands
ArrayLength
Returnsthelengthofavariablearray.
Syntax
ArrayLength(Variable)
ASCII
ReturnstheASCII/ANSIcodeofacharacterinastring.
Syntax
Variable = ASCII(ASCIIString(1,1,X))
Przeglądanie stron 504
1 2 ... 500 501 502 503 504 505 506 507 508 509 510 ... 589 590

Komentarze do niniejszej Instrukcji

Brak uwag