BioBIKE Language Syntax
A. Introduction to BioBIKE Language Syntax
A.2. Basic conventions of BioBIKE
A.2.a. BioBIKE Syntax - Overview
泰安面积Syntax in BioBIKE is much simpler and more regular than in English, but we can still recognize the similarity. Consider the following statement in BioBIKE:
-BioBIKE, like English, has structure.
-The basic units of the language are functions (similar to English ntences), reprented as yellow boxes with thick solid boundaries.
-The structure of the ntence is largely determined by its verb (also the name of the function), which in BioBIKE always resides at the beginning (SEQUENCE-OF in the above example).*
-The structure consists of holes to be filled, gray boxes (like objects in English). When the information is required, the hole resides directly in the yellow box. The holes are called arguments to the function.
-Modifications to how the function works are reprented as blue boxes if the modification is either done or not done (e.g. INVERT in the above example). The are called flags.
-Modifications to how the function works requiring extra information are reprented as blue boxes with gray holes. The are called keywords. Collectively, flags and keywords are known as options.
-Holes can be filled with functions that provide the required content, leading to functions nested within other functions.
城市的英语怎么读That's about all there is to know about the syntax of most BioBIKE functions.
A.2.b. How to Find and Invoke BioBIKE Functions
Your English vocabulary is no doubt veral thousand words. BioBIKE has a much smaller vocabulary, and therefore most statements in English that sound logical to you will have no meaning in BioBIKE. To form meaningful functions, it is necessary to u precily the language that BioBIKE
knows about and nothing el. To this end, most words in BioBIKE are chon from a menu. Menus are organized by subject and by alphabet. The first type of menu facilitates finding words when you have an idea of the meaning you're eking. The cond type is convenient when you know the word itlf.
For example, go into BioBIKE† and note the palette at the top of the screen:
* For the sake of readability, function names are rendered as nouns, since functions can replace objects.
(you may not e the DATA , FAVORITES , and FUNCTIONS
buttons on your screen). Mousing over any of the buttons brings
down a menu of choices. In some cas mousing over a choice
brings up a submenu. Otherwi, you must click on the choice to
lect it.
Try mousing over the green ARITHMETIC menu, and then mou
over BASIC-ARITHMETIC (e figure to right). Finally, click on
the function called RANDOM-INTEGER . A yellow function box
should appear in your green workspace.
得的地Now find the same function from the alphabetical menu on the
palette called ALL . You'll need to mou over that button and then
mou over the R button. Clicking RANDOM-INTEGER brings
down the same function as before.
A third way to get the function is from your blue FAVORITES
button on the palette. As you u BioBIKE, the FAVORITES
button automatically becomes populated with the functions that
you u the most. You can add or subtract functions from this button yourlf (by ADD ing, DELET ing, or CLEAR ing favorites through the black EDIT button).
You can also arch for a desired function through the arch facility accessible
through the red HELP! key (upper left in the palette). Entering a key word may
bring you to the documentation of a function that us that word or something
similar to it. How to Work with a BioBIKE Function
The RANDOM-INTEGER box you brought down in the previous
ction has the three icons typical of function boxes in BioBIKE: Action icon : Mousing over this icon brings up a menu of actions related to the function, including executing the function and function-specific help.
Click EXECUTE on the Action menu of RANDOM-INTEGER , executing the box and everything within it. The result will appear in the blue Result Window . Clear/Delete icon : Clicking this icon will delete the function from the workspace.
Try it! (To get the function back, click the UnDo icon ( ) at the top of the workspace). Option icon : The way a function works can be modified by the addition of options chon
from a menu accessible through the Option icon.
Mou over the Option icon of RANDOM-INTEGER and click the FROM option, then do the same thing but this time clicking the TO option. By using the options you can t the range of numbers from which RANDOM-INTEGER choos.
We'll e in the next ction how to fill in the holes governed by the options. † You'll have a much better time if you actually u BioBIKE as you read this documentation.
Display A.2.d. Filling in Holes of Arguments and Keywords
Confronted by the function produced as described in the
previous ction, how do you
08奥运provide the two values demanded
by the FROM and TO options? To fill a hole, lect it by clicking on the descriptor (value in the above example). The box will turn white, indicating that it is open for input. Do this for both holes, typing your favorite numbers into each. You will get something like this:
Now execute the function, by mousing over the action icon of the
function and clicking Execute , as shown to the right, and… an error
收到礼物
message!
You are trying to evaluate code that is not completed!...
The most likely cau is that an entry box has not been
clod.
Indeed! The entry boxes are still open. You know this becau they're white. This is probably the most common error in BioBIKE. So, take heed:
青少年奶粉排行榜10强You cannot execute a function that contains an open, white box! Clo an entry box by tapping either Tab or Enter on your keyboard after typing in the box. Get into the habit of doing one or the other every time that you finish using the keyboard in BioBIKE. Tab differs from Enter in that it moves the cursor to the next hole and opens it for input.
Having made the mistake of going away from the open boxes, return to one of them by clicking in the white area and then closing it (Tab or Enter ). Do it and execute… Now a random integer between 29 and 47 will very likely appear in the violet Result Window.
Another way to fill a hole is to lect it and fill it with a function. You may also fill a hole by pasting into the box, using the Paste function in the Action menu. More on that in a later ction.
Execution of functions: Results and Displays
A function may be thought of as a black box (or, in BioBIKE, a more pleasing citrus-colored box). It accepts input from a human (or a previous function) through the gray argument boxes and emits a result. There's some room for
dial twiddling, using the blue-green Options,
but most of the magic takes place beyond reach inside the box. All functions emit results, which can be ud as input by subquent functions. The results
enveloping function or, if there is no such
function, appears in the Result Window . Results are therefore designed to be intelligible by functions and not always intelligible by humans.
湮没
Display: Result:
1> <Table 2d (Numeric,Hash)>
The function looks within the genome of the cyanobacterium
Synechocystis
PCC 6803 for quences similar to that of the gene sll1397. The results are displayed in formatted columns and also returned as a result, i.e. a table that can be ud in
subquent computations.
Some functions also display information
in a parate window. The function to the
right provides an example. It displays a formatted table, part of which is appears
to the right. The same information is also
小学数学论文contained in a table, the result of the
function, reprented in the Results
Window as shown. It is esntial to understand the difference between the result of a function and what the function displays . The result may be pasted into an argument box (or pasd in by nesting) and ud by another function. You can
go through as long a quence of Function --> Result --> Function --> Result … as you like. In contrast, the display is solely for the amument of the human. If you expect the display of a function to be ud by a subquent function, you will be disappointed.
A very common error is shown to the
right. Executing LENGTH-OF produces
a rather nice display of the genome
quence of the cyanobacterium Prochlorococcus marinus SS120. The result is 0! How can the length of the genome, which is displayed for anyone to e, be zero? This paradox disappears once you realize that DISPLAY-SEQUENCE-OF only displays the quence. It does not return the quence as a result. But since every function must have some result, it returns nothing, NIL. And the length of nothing is zero.