BB___Strings

=Strings= toc

Description
> Strings are representations of alphanumeric characters and are always enclosed in double quotes ("). No quotation marks are allowed within a string. >> A string can contain digits 0 thru 9, but they are character representations of the numbers and cannot be used as numbers. To convert a string of digits to its numeric equivalent, use the val function.

Syntax
A string literal: A string variable:
 * 1)  - (Produces: a = 1 + 3 * x)
 * 1)  - (Produces: a = 1 + 3 * x)

Hints
>> code format="lb" three$ = "and a three..." print "A one... " + " and a two..." + three$ code You can also use the semi-colon to add strings together: >> code format="lb" three$ = "and a three..." print "A one... " ; " and a two..." ; three$ code You get an additional capability when using the semi-colon; you can add numeric values (literal, variables, or expressions) into your concatenated string: >> code format="lb" print "A one... " ; " and a two..." ; " and a " ; 3 code >> code format="lb" print "A one... " ; " and a "; chr$(34); "two..." ; chr$(34) ; " and a " ; 3 code
 * //**Manipulating Strings.**// There are only two ways in JB to represent literal or variable values: string values or numeric values. Strings are, in effect, just text. Numeric values can be manipulated with mathematical operators. String values also can be manipulated, but in different ways. Strings can be added together; that's called concatenation. You can extract from strings using the string functions left$, mid$, and right$. You cannot divide a string by another string or multiply a string by another string.
 * //**Concatenation.**//You can add together string literals or string variables, or combinations of both, using the plus (+) sign:
 * //**Empty Strings.**// It is allowable to have only quotation marks with nothing between - "" -. This is called an empty string. It can be used to display a blank line, for instance.
 * //**Printing Double Quotation Marks.**// If it is necessary to include quotation marks within your string, you can use the chr$function with the ASCII value which represents a double quote (34) and concatenate your string, like this:

Example
code format="lb" Place a simple, working example of the keyword here code

Useful Procedures
code format="lb" Place a useful function using this keyword here code