click below
click below
Normal Size Small Size show me how
VB Strings
String vocabulary for Visual Basic
| Question | Answer |
|---|---|
| string literal | designated by using quotation marks around it; actual characters |
| string variable | name of a variable that is declared as the String data type in the code; name of a textbox or a label |
| string value | data being held in a string variable |
| empty string | no characters in it; designated by "" |
| concatenation | connecting several strings together |
| & | ampersand; concatenation operator |
| Str( ) | converts a numerical value into a string value |
| Val( ) | converst a string value into a numerical value |
| string | digits, letters, symbols that are NOT used for mathematical operations |
| example of numbers as strings | social security number, phone number, because calculations are not done with these |
| Len( ) | number of characters and spaces in a string |
| concatenate | join strings together |
| Str( ) | convert numerical value into a string |
| Val( ) | convert a string into a numerical value |
| declaration of string variable | Dim FirstName As String |
| assigning a string literal to a string variable | FirstName = "James" |
| making a string literal appear in a message box | MsgBox "INVALID DATA" |
| example of a string variable for a textbox | txtUnits |
| example of concatenation in output | lblOutput = Str(Result) & " square " & txtUnits |
| concatenation of string variables | FullName = FirstNmae & " " & LastName |
| ASCII code | code number for a character |
| comparison operators for strings | =, >, <, <>, >=, <= |
| comparison of strings | earlier in the alphabet is less than later in the alphabet |
| uppercase letters | ASCII codes from 65 to 90 |
| lowercase letters | ASCII codes from 97 to 122 |
| UCase( ) | turn string value into uppercase |
| LCase( ) | make string value lowercase |
| 13 | ASCII code of Enter key |
| 0 | Length of empty string |