A. General Considerations
Upper/Lower case
Spacing
Names of variables
Legal characters
Data types
Comments
- Upper/Lower case: It doesn't matter to the language whether you type in upper case, lower case, or a mixture (except, sometimes, when you're typing something within quotation marks). Do whatever is easiest and/or clearest for you.
- Spacing: The language also doesn't care how many spaces or lines you put between symbols. The following are equivalent (to the computer):
(for-each protein in (proteins-of avar) as sequence = (sequence-of protein) when (successful (search "rilkiqtl" sequence)) collect protein) OR (FOR-EACH protein IN (PROTEINS-OF Avar) AS sequence = (SEQUENCE-OF protein) WHEN (SUCCESSFUL (SEARCH "RILKIQTL" sequence)) COLLECT protein)- Names of variables: There are almost no reserved words in the language -- use any name you like for a variable. However, the language will protect itself (and you) if you try to redefine a core function (e.g. redefining "+" to mean subtract). Also BBL can sometimes get confused if you use a function name as the name of a variable.
- Legal characters: You can use in variable or function names the usual letters and numerals (except that a name cannot consist solely of numerals). In addition, you can skate along the top of your keyboard and make names with the following characters: ~!@$%^&*_?/-+=. But there are limitations. You can't put the following symbols in names: .,:;|\()[]{} or any manner of quotation mark. Thus the following is legal:
(DEFINE @$%&! AS All4312) ; (perhaps an unclonable gene)- Data types: Lisp is a highly typed language. BBL does behind the scene type conversions so that users seldom have to consider data types. (If you don't know what I'm talking about, it probably won't matter)
- Comments: There are two ways to designate comments (text that's ignored by the language, there just to document your thoughts). First, a semicolon signifies that anything remaining in the line is to be ignored. Second the pair of symbols #| and |# specify that anything in between is to be ignored. Examples:
(CONTEXT-OF (2376879 2501670 4918619 5946036) IN #$A7120.chromosome) ; (All the SphI sites in Anabaena PCC 7120) (DEFINE marine-cb AS {PMed4 SS120 MIT9414 S8102} ) #| Define a set of marine cyanobacteria consisting of Prochlorococcus marinus MED4 Prochlorococcus marinus SS120 Prochlorococcus marinus MIT9414 Synechococcus WH8102 |#
Back to Table of Contents Continue