{"id":34852,"date":"2022-10-26T00:45:18","date_gmt":"2022-09-22T00:32:19","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/"},"modified":"2024-01-15T08:24:47","modified_gmt":"2024-01-15T00:24:47","slug":"%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/","title":{"rendered":"\u4f7f\u7528Docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker(116)"},"content":{"rendered":"<p>\u4f7f\u7528GCC\u5728Docker\u4e2d\u542f\u52a8BASIC\u3002<\/p>\n<pre class=\"post-pre\"><code>$ docker run -it gcc \/bin\/bash\r\n<\/code><\/pre>\n<p>\u641c\u7d22\u57fa\u7840<\/p>\n<pre class=\"post-pre\"><code># apt update; apt -y upgrade; apt install man\r\n# apt search basic\r\nSorting... Done\r\nFull Text Search... Done\r\nacheck-rules\/stable 0.3.3 all\r\n  Basic rules for acheck\r\n\r\nbwbasic\/stable 2.20pl2-11+b2 amd64\r\n  Bywater BASIC Interpreter\r\n\r\nyabasic\/stable 1:2.82.0-1 amd64\r\n  Yet Another BASIC interpreter\r\n\r\n# apt install yabasic\r\n# man yabasic\r\nyabasic(1)                   General Commands Manual                   yabasic(1)\r\n\r\nNAME\r\n       yabasic - yet another Basic\r\n\r\nSYNOPSIS\r\n       yabasic [OPTIONS] [FILENAME [ARGUMENTS]]\r\n\r\nDESCRIPTION\r\n       Yabasic  implements  the most common and simple elements of the basic lan-\r\n       guage. It comes with goto\/gosub, with various  loops,  with  user  defined\r\n       subroutines  and  libraries.  Yabasic  does  simple graphics and printing.\r\n       Yabasic runs under Unix and Windows, it is small, open source and free.\r\n\r\n       This man-page is derived from yabasic.htm, which too should  be  installed\r\n       on your system; per default in\r\n\r\n       \/usr\/local\/share\/applications\/yabasic\/yabasic.htm.\r\n\r\n       The same information can also be found on www.yabasic.de\r\n\r\n       Here is its content:\r\n\r\n        Yabasic\r\n\r\n        ----------------------------------------------------------------------------\r\n---\r\n\r\n        Table of Contents\r\n\r\n        1. Introduction\r\n\r\n            About this document\r\n            About yabasic\r\n\r\n        2. The yabasic-program under Windows\r\n\r\n            Starting yabasic\r\n            Options\r\n            The context Menu\r\n\r\n        3. The yabasic-program under Unix\r\n\r\n            Starting yabasic\r\n            Options\r\n            Setting defaults\r\n\r\n        4. Command line options of yabasic\r\n        5. Some features of yabasic, explained by topic\r\n\r\n            print, input and others\r\n            Control statements: loops, if and switch\r\n            Drawing and painting\r\n            Reading from and writing to files\r\n            Subroutines and Libraries\r\n            String processing\r\n            Arithmetic and numbers\r\n            Data and such\r\n            Other interesting commands.\r\n\r\n        6. All commands and functions of yabasic listed by topic\r\n\r\n            Number processing and conversion\r\n            Conditions and control structures\r\n            Data keeping and processing\r\n            String processing\r\n            File operations and printing\r\n            Subroutines and libraries\r\n            Other commands\r\n            Graphics and printing\r\n\r\n        7. All commands and functions of yabasic grouped alphabetically\r\n\r\n            A\r\n            B\r\n            C\r\n            D\r\n            E\r\n            F\r\n            G\r\n            H\r\n            I\r\n            L\r\n            M\r\n            N\r\n            O\r\n            P\r\n            R\r\n            S\r\n            T\r\n            U\r\n            V\r\n            W\r\n            X\r\n            Special characters\r\n            Reserved Words\r\n\r\n        8. Some general concepts and terms\r\n\r\n            Logical shortcuts\r\n            Conditions and expressions\r\n            References on arrays\r\n            Specifying Filenames under Windows\r\n            Escape-sequences\r\n            Creating a standalone program from your yabasic-program\r\n\r\n        9. A few example programs\r\n\r\n            A very simple program\r\n            The demo of yabasic\r\n\r\n        10. The Copyright of yabasic\r\n\r\n        Chapter 1. Introduction\r\n\r\n        About this document\r\n        About yabasic\r\n\r\n        About this document\r\n\r\n        This document describes yabasic. You will find information about the yabasic\r\n        interpreter (the program yabasic under Unix or yabasic.exe under Windows) as\r\n        well as the language (which is, of course, a sort of basic) itself.\r\n\r\n        This document applies to version 2.82 of yabasic\r\n\r\n        However, this document does not contain the latest news about yabasic or a F\r\nAQ.\r\n        As such information tends to change rapidly, it is presented online only at\r\n        www.yabasic.de.\r\n\r\n        Although basic has its reputation as a language for beginning programmers, t\r\nhis\r\n        is not an introduction to programming at large. Rather this text assumes, th\r\nat\r\n        the reader has some (moderate) experience with writing and starting computer\r\n        programs.\r\n\r\n        About yabasic\r\n\r\n        yabasic is a traditional basic interpreter. It understands most of the typic\r\nal\r\n        basic-constructs, like goto, gosub, line numbers, read, data or\r\n        string-variables with a trailing '$'. But on the other hand, yabasic impleme\r\nnts\r\n        some more advanced programming-constructs like subroutines or libraries (but\r\n        not objects). yabasic works much the same under Unix and Windows.\r\n\r\n        yabasic puts emphasis on giving results quickly and easily; therefore simple\r\n        commands are provided to open a graphic window, print the graphics or contro\r\nl\r\n        the console screen and get keyboard or mouse information. The example below\r\n        opens a window, draws a circle and prints the graphic:\r\n\r\n        open window 100,100\r\n        open printer\r\n        circle 50,50,40\r\n        text 10,50,\"Press any key to get a printout\"\r\n        clear screen\r\n        inkey$\r\n        close printer\r\n        close window\r\n\r\n        This example has fewer lines, than it would have in many other programming\r\n        languages. In the end however yabasic lacks behind more advanced and modern\r\n        programming languages like C++ or Java. But as far as it goes it tends to gi\r\nve\r\n        you results more quickly and easily.\r\n\r\n        Chapter 2. The yabasic-program under Windows\r\n\r\n        Starting yabasic\r\n        Options\r\n        The context Menu\r\n\r\n        Starting yabasic\r\n\r\n        Once, yabasic has been set up correctly, there are three ways to start it:\r\n\r\n         1. Right click on your desktop: The desktop menu appears with a submenu nam\r\ned\r\n            new. From this submenu choose yabasic. This will create a new icon on yo\r\nur\r\n            desktop. If you right click on this icon, its context menu will appear;\r\n            choose Execute to execute the program.\r\n\r\n         2. As a variant of the way described above, you may simply create a file wi\r\nth\r\n            the ending .yab (e.g. with your favorite editor). Everything else then\r\n            works as described above.\r\n\r\n         3. From the start-menu: Choose yabasic from your start-menu. A console-wind\r\now\r\n            will open and you will be asked to type in your program. Once you are\r\n            finished, you need to type return twice, and yabasic will parse and exec\r\nute\r\n            your program.\r\n\r\n            Note\r\n\r\n            This is not the preferred way of starting yabasic ! Simply because the\r\n            program, that you have typed, can not be saved and will be lost inevitab\r\nly\r\n            ! There is no such thing as a save-command and therefore no way to conse\r\nrve\r\n            the program, that you have typed. This mode is only intended for quick\r\n            hacks, and short programs.\r\n\r\n        Options\r\n\r\n        Under Windows yabasic will mostly be invoked by double-clicking on an\r\n        appropriate icon; this way you do not have a chance to specify any of the\r\n        command line options below. However, advanced users may change the librarypa\r\nth\r\n        in the registry, which has the same effect as specifying it as an option on \r\nthe\r\n        command line.\r\n\r\n        See the chapter on options for a complete list of all options, either on Uni\r\nx\r\n        or Windows.\r\n\r\n        The context Menu\r\n\r\n        Like every other icon under Windows, the icon of every yabasic-program has a\r\n        context menu offering the most frequent operations, that may be applied to a\r\n        yabasic-program.\r\n\r\n        Execute\r\n\r\n            This will invoke yabasic to execute your program. The same happens, if y\r\nou\r\n            double click on the icon.\r\n\r\n        Edit\r\n\r\n            notepad will be invoked, allowing you to edit your program.\r\n\r\n        View docu\r\n\r\n            This will present the embedded documentation of your program. Embedded\r\n            documentation is created with the special comment doc.\r\n\r\n        Chapter 3. The yabasic-program under Unix\r\n\r\n        Starting yabasic\r\n        Options\r\n        Setting defaults\r\n\r\n        Starting yabasic\r\n\r\n        If your system administrator (vulgo root) has installed yabasic correctly,\r\n        there are three ways to start it:\r\n\r\n         1. You may use your favorite editor (emacs, vi ?) to put your program into \r\na\r\n            file (e.g. foo). Make sure that the very first line starts with the\r\n            characters '#!' followed by the full pathname of yabasic (e.g. '#!\/usr\/\r\n            local\/bin\/yabasic'). This she-bang-line ensures, that your Unix will inv\r\noke\r\n            yabasic to execute your program (see also the entry for the hash\r\n            -character). Moreover, you will need to change the permissions of your\r\n            yabasic-program foo, e.g. chmod u+x foo. After that you may invoke yabas\r\nic\r\n            to invoke your program by simply typing foo (without even mentioning\r\n            yabasic). However, if your PATH-variable does not contain a single dot\r\n            ('.') you will have to type the full pathname of your program: e.g. \/hom\r\ne\/\r\n            ihm\/foo (or at least .\/foo).\r\n\r\n         2. Save your program into a file (e.g. foo) and type yabasic foo. This\r\n            assumes, that the directory, where yabasic resides, is contained within\r\n            your PATH-variable.\r\n\r\n         3. Finally your may simply type yabasic (maybe it will be necessary to incl\r\nude\r\n            its full pathname). This will make yabasic come up and you will be asked\r\n to\r\n            type in your program. Once you are finished, you need to type return twi\r\nce,\r\n            and yabasic will parse and execute your program.\r\n\r\n            Note\r\n\r\n            This is not the preferred way of starting yabasic ! Simply because the\r\n            program, that you have typed, can not be saved and will be lost inevitab\r\nly\r\n            ! There is no such thing as a save-command and therefore no way to conse\r\nrve\r\n            the program, that you have typed. This mode is only intended for quick\r\n            hacks, and short programs, i.e. for using yabasic as some sort of fancy\r\n            desktop calculator.\r\n\r\n        Options\r\n\r\n        yabasic accepts a number of options on the command line.\r\n\r\n        See chapter on options for a complete list of all options, either on Unix or\r\n        Windows.\r\n\r\n        Setting defaults\r\n\r\n        If you want to set some options once for all, you may put them into your\r\n        X-Windows resource file. This is usually the file .Xresources or some such\r\n        within your home directory (type man X for details).\r\n\r\n        Here is a sample section, which may appear within this file:\r\n\r\n        yabasic*foreground: blue\r\n        yabasic*background: gold\r\n        yabasic*geometry: +10+10\r\n        yabasic*font: 9x15\r\n\r\n        This will set the foreground color of the graphic-window to blue and the\r\n        background color to gold. The window will appear at position 10,10 and the t\r\next\r\n        font will be 9x15.\r\n\r\n        Chapter 4. Command line options of yabasic\r\n\r\n        Here are the options, that yabasic accepts on the command line (both under U\r\nnix\r\n        and Windows).\r\n\r\n        All the options below may be abbreviated (and one hyphen may be dropped), as\r\n        long as the abbreviation does not become ambiguous. For example, you may wri\r\nte\r\n        -e instead of --execute.\r\n\r\n        --help or -?\r\n\r\n            Prints a short help message, which itself describes two further\r\n            help-options.\r\n\r\n        --version\r\n\r\n            Prints the version of yabasic.\r\n\r\n        --infolevel INFOLEVEL\r\n\r\n            Change the infolevel of yabasic, where INFOLEVEL can be one of debug, no\r\nte,\r\n            warning, error, fatal and bison (the default is warning). This option\r\n            changes the amount of debugging-information yabasic produces. However,\r\n            normally only the author of yabasic (me !) would want to change this.\r\n\r\n        --execute A-PROGRAM-AS-A-SINGLE-STRING\r\n\r\n            With this option you may specify some yabasic-code to be executed right\r\n            away. This is useful for very short programs, which you do not want to s\r\nave\r\n            to a file. If this option is given, yabasic will not read any code from \r\na\r\n            file. E.g.\r\n\r\n            yabasic -e 'for a=1 to 10:print a*a:next a'\r\n\r\n            prints the square numbers from 1 to 10.\r\n\r\n        --bind NAME-OF-STANDALONE-PROGRAM\r\n\r\n            Create a standalone program (whose name is specified by\r\n            NAME-OF-STANDALONE-PROGRAM) from the yabasic-program, that is specified \r\non\r\n            the command line. See the section about creating a standalone-program fo\r\nr\r\n            details.\r\n\r\n        --geometry +X-POSITION+Y-POSITION\r\n\r\n            Sets the position of the graphic window, that is opened by open window (\r\nthe\r\n            size of this window, of course, is specified within the open\r\n            window-command). An example would be -geometry +20+10, which would place\r\n            the graphic window 10 pixels below the upper border and 20 pixels right \r\nof\r\n            the left border of the screen. This value cannot be changed, once yabasi\r\nc\r\n            has been started.\r\n\r\n        -fg FOREGROUND-COLOR or --foreground FOREGROUND-COLOR\r\n\r\n            Unix only. Define the foreground color for the graphics-window (that wil\r\nl\r\n            be opened with open window). The usual X11 color names, like red, green,\r\n ?\r\n            are accepted. This value cannot be changed, once yabasic has been starte\r\nd.\r\n\r\n        -bg BACKGROUND-COLOR or --background BACKGROUND-COLOR\r\n\r\n            Unix only. Define the background color for the graphics-window. The usua\r\nl\r\n            X11 color names are accepted. This value cannot be changed, once yabasic\r\n            has been started.\r\n\r\n        --display X11-DISPLAY-SPECIFICATION\r\n\r\n            Unix only. Specify the display, where the graphics window of yabasic sho\r\nuld\r\n            appear. Normally this value will be already present within the environme\r\nnt\r\n            variable DISPLAY.\r\n\r\n        --font NAME-OF-FONT\r\n\r\n            Under Unix. Name of the font, which will be used for text within the\r\n            graphics window.\r\n\r\n        --font NAME-OF-FONT\r\n\r\n            Under Windows. Name of the font, which will be used for graphic-text; ca\r\nn\r\n            be any of decorative, dontcare, modern, roman, script, swiss. You may\r\n            append a fontsize (measured in pixels) to any of those fontnames; for\r\n            example -font swiss30 chooses a swiss-type font with a size of 30 pixels\r\n.\r\n\r\n        --docu NAME-OF-A-PROGRAM\r\n\r\n            Print the embedded documentation of the named program. The embedded\r\n            documentation of a program consists of all the comments within the progr\r\nam,\r\n            which start with the special keyword doc. This documentation can also be\r\n            seen by choosing the corresponding entry from the context-menu of any\r\n            yabasic-program.\r\n\r\n        --check\r\n\r\n            Check for possible compatibility problems within your yabasic-program. E\r\n.g.\r\n            this option reports, if you are using a function, that has recently\r\n            changed.\r\n\r\n        --librarypath DIRECTORY-WITH-LIBRARIES\r\n\r\n            Change the directory, wherein libraries will be searched and imported (w\r\nith\r\n            the import-command). See also import for more information about the way,\r\n            libraries are searched.\r\n\r\n        --\r\n\r\n            Do not try to parse any further options; rather pass the subsequent word\r\ns\r\n            from the commandline to yabasic.\r\n\r\n        Chapter 5. Some features of yabasic, explained by topic\r\n\r\n        print, input and others\r\n        Control statements: loops, if and switch\r\n        Drawing and painting\r\n        Reading from and writing to files\r\n        Subroutines and Libraries\r\n        String processing\r\n        Arithmetic and numbers\r\n        Data and such\r\n        Other interesting commands.\r\n\r\n        This chapter has sections for some of the major features of yabasic and name\r\ns a\r\n        few commands related with each area. So, depending on your interest, you fin\r\nd\r\n        the most important commands of this area named; the other commands from this\r\n        area may then be discovered through the links in the see also-section.\r\n\r\n        print, input and others\r\n\r\n        The print-command is used to put text on the text screen. Here, the term tex\r\nt\r\n        screen stands for your terminal (under Unix) or the console window (under\r\n        Windows).\r\n\r\n        At the bottom line, print simply outputs its argument to the text window.\r\n        However, once you have called clear screen you may use advanced features lik\r\ne\r\n        printing colors or copying areas of text with getscreen$ or putscreen.\r\n\r\n        You may ask the user for input with the input-command; use inkey$ to get eac\r\nh\r\n        key as soon as it is pressed.\r\n\r\n        Control statements: loops, if and switch\r\n\r\n        Of course, yabasic has the goto- and gosub-statements; you may go to a label\r\n or\r\n        a line number (which is just a special kind of label). goto, despite its bad\r\n        reputation ([goto considered harmful]), has still its good uses; however in\r\n        many cases you are probably better off with loops like repeat-until, while-w\r\nend\r\n        or do-loop; you may leave any of these loops with the break-statement or sta\r\nrt\r\n        the next iteration immediately with continue.\r\n\r\n        Decisions can be made with the if-statement, which comes either in a short a\r\nnd\r\n        a long form. The short form has no then-keyword and extends up to the end of\r\n        the line. The long form extends up to the final endif and may use some of th\r\ne\r\n        keywords then (which introduces the long form), else or elsif.\r\n\r\n        If you want to test the result of an expression against many different value\r\ns,\r\n        you should probably use the switch-statement.\r\n\r\n        Drawing and painting\r\n\r\n        You need to call open window before you may draw anything with either line,\r\n        circle, rectangle or triangle; all of these statements may be decorated with\r\n        clear or fill. If you want to change the colour for drawing, use colour. Not\r\ne\r\n        however, that there can only be a single window open at any given moment in\r\n        time.\r\n\r\n        Everything you have drawn can be send to your printer too, if you use the op\r\nen\r\n        printer command.\r\n\r\n        To allow for some (very) limited version of animated graphics, yabasic offer\r\ns\r\n        the commands getbit$ and putbit, which retrieve rectangular regions from the\r\n        graphics-window into a string or vice versa.\r\n\r\n        If you want to sense mouse-clicks, you may use the inkey$-function.\r\n\r\n        Reading from and writing to files\r\n\r\n        Before you may read or write a file, you need to open it; once you are done,\r\n        you should close it. Each open file is designated by a simple number, which\r\n        might be stored within a variable and must be supplied if you want to access\r\n        the file. This is simply done by putting a hash ('#') followed by the number\r\n of\r\n        the file after the keyword input (for reading from) or print (for writing to\r\n a\r\n        file) respectively.\r\n\r\n        If you need more control, you may consider reading and writing one byte at a\r\n        time, using the multi-purpose commands peek and poke.\r\n\r\n        Subroutines and Libraries\r\n\r\n        The best way to break any yabasic-program into smaller, more manageable chun\r\nks\r\n        are subroutines and libraries. They are yabasic's most advanced means of\r\n        structuring a program.\r\n\r\n        Subroutines are created with the command sub. they accept parameters and may\r\n        return a value. Subroutines can be called much like any builtin function of\r\n        yabasic; therefore they allow one to extend the language itself.\r\n\r\n        Once you have created a set of related subroutines and you feel that they co\r\nuld\r\n        be useful in other programs too, you may collect them into a library. Such a\r\n        library is contained within a separate file and may be included in any of yo\r\nur\r\n        programs, using the keyword import, which see.\r\n\r\n        String processing\r\n\r\n        yabasic has a set of functions to extract parts from a string: left$, mid$ a\r\nnd\r\n        right$. Note, that all of them can be assigned to, i.e. they may change part\r\n of\r\n        a string.\r\n\r\n        If you want to split a string into tokens you should use the functions token\r\n or\r\n        split.\r\n\r\n        Some functions are handy for normalizing a string: upper$ and lower$ convert\r\n a\r\n        string to all upper or lower case respectively, whereas chomp$ cuts of any\r\n        trailing newline character, but only if present.\r\n\r\n        chr$ and str$ convert a string into a number, both in different ways.\r\n\r\n        To analyze a string use instr (finding one string within the other) or glob\r\n        (testing a string against a simple pattern).\r\n\r\n        To concatenate strings use the operator + like in a$ + b$.\r\n\r\n        You may also see the complete list of a string processing functions.\r\n\r\n        Arithmetic and numbers\r\n\r\n        Yabasic handles numbers and arithmetic: You may calculate trigonometric\r\n        functions like sin or atan, or logarithms (with log). Bitwise operations, li\r\nke\r\n        and or or are available as well min or max (calculate the minimum or maximum\r\n of\r\n        its argument) or mod or int (reminder of a division or integer part or a\r\n        number).\r\n\r\n        Conversion between numerical bases can be done with hex$ and dec. And you ma\r\ny\r\n        write hexadecimal constants in the usual way, e.g.\r\n\r\n        print 0xff\r\n\r\n        . All calculations in yabasic are done with double precision.\r\n\r\n        Data and such\r\n\r\n        You may store data within your program within data-statements; during execut\r\nion\r\n        you will probably want to read it into arrays, which must have been dimed\r\n        before.\r\n\r\n        Other interesting commands.\r\n\r\n          * Yabasic programs may start other programs with the commands system and\r\n            system$.\r\n\r\n          * peek and poke allow one to get and set internal information; either for \r\nthe\r\n            operating system (i.e. Unix or Windows) or yabasic itself.\r\n\r\n          * The current time or date can be retrieved with (guess what !) time$ and\r\n            date$.\r\n\r\n        Chapter 6. All commands and functions of yabasic listed by topic\r\n\r\n        Number processing and conversion\r\n        Conditions and control structures\r\n        Data keeping and processing\r\n        String processing\r\n        File operations and printing\r\n        Subroutines and libraries\r\n        Other commands\r\n        Graphics and printing\r\n\r\n        Number processing and conversion\r\n\r\n        abs()\r\n            returns the absolute value of its numeric argument\r\n        acos()\r\n            returns the arcus cosine of its numeric argument\r\n        and()\r\n            the bitwise arithmetic and\r\n        asin()\r\n            returns the arcus sine of its numeric argument\r\n        atan()\r\n            returns the arctangent of its numeric argument\r\n        bin$()\r\n           converts a number into a sequence of binary digits\r\n        cos()\r\n            return the cosine of its single argument\r\n        dec()\r\n            convert a base 2 or base 16 number into decimal form\r\n        eor()\r\n            compute the bitwise exclusive or of its two arguments\r\n        euler\r\n            another name for the constant 2.71828182864\r\n        exp()\r\n            compute the exponential function of its single argument\r\n        frac()\r\n            return the fractional part of its numeric argument\r\n        int()\r\n            return the integer part of its single numeric argument\r\n        ceil()\r\n            return the smallest integral number, that is greater or equal than i\r\nts\r\n            argument\r\n        floor()\r\n            return the largest integral number, that is smaller or equal than it\r\ns\r\n            argument\r\n        log()\r\n            compute the natural logarithm\r\n        max()\r\n            return the larger of its two arguments\r\n        min()\r\n            return the smaller of its two arguments\r\n        mod\r\n            compute the remainder of a division\r\n        or()\r\n            arithmetic or, used for bit-operations\r\n        pi\r\n            a constant with the value 3.14159\r\n        ran()\r\n            return a random number\r\n        sig()\r\n            return the sign of its argument\r\n        sin()\r\n            return the sine of its single argument\r\n        sqr()\r\n            compute the square of its argument\r\n        sqrt()\r\n            compute the square root of its argument\r\n        tan()\r\n            return the tangent of its argument\r\n        xor()\r\n            compute the exclusive or\r\n        ** or ^\r\n            raise its first argument to the power of its second\r\n\r\n        Conditions and control structures\r\n\r\n        and\r\n            logical and, used in conditions\r\n        break\r\n            breaks out of a switch statement or a loop\r\n        case\r\n            mark the different cases within a switch-statement\r\n        continue\r\n            start the next iteration of a for-, do-, repeat- or while-loop\r\n        default\r\n            mark the default-branch within a switch-statement\r\n        do\r\n            start a (conditionless) do-loop\r\n        else\r\n            mark an alternative within an if-statement\r\n        elsif\r\n            starts an alternate condition within an if-statement\r\n        end\r\n            terminate your program\r\n        endif\r\n            ends an if-statement\r\n        false\r\n            a constant with the value of 0\r\n        fi\r\n            another name for endif\r\n        for\r\n            starts a for-loop\r\n        gosub\r\n            continue execution at another point within your program (and return \r\nlater)\r\n        goto\r\n            continue execution at another point within your program (and never c\r\nome\r\n            back)\r\n        if\r\n            evaluate a condition and execute statements or not, depending on the\r\n result\r\n        label\r\n            mark a specific location within your program for goto, gosub or rest\r\nore\r\n        loop\r\n            marks the end of an infinite loop\r\n        next\r\n            mark the end of a for loop\r\n        not\r\n            negate an expression; can be written as !\r\n        on gosub\r\n            jump to one of multiple gosub-targets\r\n        on goto\r\n            jump to one of many goto-targets\r\n        on interrupt\r\n            change reaction on keyboard interrupts\r\n        logical or\r\n            logical or, used in conditions\r\n        pause\r\n            pause, sleep, wait for the specified number of seconds\r\n        repeat\r\n            start a repeat-loop\r\n        return\r\n            return from a subroutine or a gosub\r\n        sleep\r\n            pause, sleep, wait for the specified number of seconds\r\n        switch\r\n            select one of many alternatives depending on a value\r\n        then\r\n            tell the long from the short form of the if-statement\r\n        true\r\n            a constant with the value of 1\r\n        until\r\n            end a repeat-loop\r\n        wait\r\n            pause, sleep, wait for the specified number of seconds\r\n        wend\r\n            end a while-loop\r\n        while\r\n            start a while-loop\r\n        :\r\n            separate commands from each other\r\n\r\n        Data keeping and processing\r\n\r\n        arraydim()\r\n            returns the dimension of the array, which is passed as an array refe\r\nrence\r\n        arraysize()\r\n            returns the size of a dimension of an array\r\n        data\r\n            introduces a list of data-items\r\n        dim\r\n            create an array prior to its first use\r\n        read\r\n            read data from data-statements\r\n        redim\r\n            create an array prior to its first use. A synonym for dim\r\n        restore\r\n            reposition the data-pointer\r\n\r\n        String processing\r\n\r\n        asc()\r\n            accepts a string and returns the position of its first character wit\r\nhin the\r\n            ascii charset\r\n        chomp$()\r\n            Chop of the trailing newline of its string-argument; if the string d\r\noes not\r\n            end in a newline, the string is returned unchanged\r\n        chr$()\r\n            accepts a number and returns the character at this position within t\r\nhe\r\n            ascii charset\r\n        glob()\r\n            check if a string matches a simple pattern\r\n        hex$()\r\n            convert a number into hexadecimal\r\n        instr()\r\n            searches its second argument within the first; returns its position \r\nif\r\n            found\r\n        left$()\r\n            return (or change) left end of a string\r\n        len()\r\n            return the length of a string\r\n        lower$()\r\n            convert a string to lower case\r\n        ltrim$()\r\n            trim spaces at the left end of a string\r\n        mid$()\r\n            return (or change) characters from within a string\r\n        right$()\r\n            return (or change) the right end of a string\r\n        split()\r\n            split a string into many strings\r\n        str$()\r\n            convert a number into a string\r\n        token()\r\n            split a string into multiple strings\r\n        trim$()\r\n            remove leading and trailing spaces from its argument\r\n        upper$()\r\n            convert a string to upper case\r\n        val()\r\n            converts a string to a number\r\n\r\n        File operations and printing\r\n\r\n        at()\r\n            can be used in the print-command to place the output at a specified\r\n            position\r\n        beep\r\n            ring the bell within your computer; a synonym for bell\r\n        bell\r\n            ring the bell within your computer (just as beep)\r\n        clear screen\r\n            erases the text window\r\n        close\r\n            close a file, which has been opened before\r\n        close printer\r\n            stops printing of graphics\r\n        print color\r\n            print with color\r\n        print colour\r\n            see print color\r\n        eof\r\n            check, if an open file contains data\r\n        getscreen$()\r\n            returns a string representing a rectangular section of the text term\r\ninal\r\n        inkey$\r\n            wait, until a key is pressed\r\n        input\r\n            read input from the user (or from a file) and assign it to a variabl\r\ne\r\n        line input\r\n            read in a whole line of text and assign it to a variable\r\n        open\r\n            open a file\r\n        open printer\r\n            open printer for printing graphics\r\n        print\r\n            Write to terminal or file\r\n        putscreen\r\n            draw a rectangle of characters into the text terminal\r\n        reverse\r\n            print reverse (background and foreground colors exchanged)\r\n        screen\r\n            as clear screen clears the text window\r\n        seek()\r\n            change the position within an open file\r\n        tell\r\n            get the current position within an open file\r\n        using\r\n            Specify the format for printing a number\r\n        #\r\n            either a comment or a marker for a file-number\r\n        @\r\n            synonymous to at\r\n        ;\r\n            suppress the implicit newline after a print-statement\r\n\r\n        Subroutines and libraries\r\n\r\n        end sub\r\n            ends a subroutine definition\r\n        export\r\n            mark a function as globally visible\r\n        import\r\n            import a library\r\n        local\r\n            mark a variable as local to a subroutine\r\n        numparams\r\n            return the number of parameters, that have been passed to a subrouti\r\nne\r\n        return\r\n            return from a subroutine or a gosub\r\n        static\r\n            preserves the value of a variable between calls to a subroutine\r\n        step\r\n            specifies the increment step in a for-loop\r\n        sub\r\n            declare a user defined subroutine\r\n\r\n        Other commands\r\n\r\n        bind()\r\n            Binds a yabasic-program and the yabasic-interpreter together into a\r\n            standalone program.\r\n        compile\r\n            compile a string with yabasic-code on the fly\r\n        date$\r\n            returns a string with various components of the current date\r\n        doc\r\n            special comment, which might be retrieved by the program itself\r\n        docu$\r\n            special array, containing the contents of all docu-statement within \r\nthe\r\n            program\r\n        error\r\n            raise an error and terminate your program\r\n        execute$()\r\n            execute a user defined subroutine, which must return a string\r\n        execute()\r\n            execute a user defined subroutine, which must return a number\r\n        exit\r\n            terminate your program\r\n        pause\r\n            pause, sleep, wait for the specified number of seconds\r\n        peek\r\n            retrieve various internal information\r\n        peek$\r\n            retrieve various internal string-information\r\n        poke\r\n            change selected internals of yabasic\r\n        rem\r\n            start a comment\r\n        sleep\r\n            pause, sleep, wait for the specified number of seconds\r\n        system()\r\n            hand a statement over to your operating system and return its exitco\r\nde\r\n        system$()\r\n            hand a statement over to your operating system and return its output\r\n        time$\r\n            return a string containing the current time\r\n        to\r\n            this keyword appears as part of other statements\r\n        wait\r\n            pause, sleep, wait for the specified number of seconds\r\n        \/\/\r\n            starts a comment\r\n        :\r\n            separate commands from each other\r\n\r\n        Graphics and printing\r\n\r\n        backcolor\r\n            specify the colour for subsequent drawing of the background\r\n        box\r\n            draw a rectangle. A synonym for rectangle\r\n        circle\r\n            draws a circle in the graphic-window\r\n        clear\r\n            Erase circles, rectangles or triangless\r\n        clear window\r\n            clear the graphic window and begin a new page, if printing is under \r\nway\r\n        close curve\r\n            close a curve, that has been drawn by the line-command\r\n        close window\r\n            close the graphics-window\r\n        colour\r\n            specify the colour for subsequent drawing\r\n        dot\r\n            draw a dot in the graphic-window\r\n        fill\r\n            draw a filled circles, rectangles or triangles\r\n        getbit$()\r\n            return a string representing the bit pattern of a rectangle within t\r\nhe\r\n            graphic window\r\n        line\r\n            draw a line\r\n        mouseb\r\n            extract the state of the mousebuttons from a string returned by inke\r\ny$\r\n        mousemod\r\n            return the state of the modifier keys during a mouseclick\r\n        mousex\r\n            return the x-position of a mouseclick\r\n        mousey\r\n            return the y-position of a mouseclick\r\n        new curve\r\n            start a new curve, that will be drawn with the line-command\r\n        open window\r\n            open a graphic window\r\n        putbit\r\n            draw a rectangle of pixels into the graphic window\r\n        rectangle\r\n            draw a rectangle\r\n        triangle\r\n            draw a triangle\r\n        text\r\n            write text into your graphic-window\r\n        window origin\r\n            move the origin of a window\r\n\r\n        Chapter 7. All commands and functions of yabasic grouped alphabetically\r\n\r\n        A\r\n        B\r\n        C\r\n        D\r\n        E\r\n        F\r\n        G\r\n        H\r\n        I\r\n        L\r\n        M\r\n        N\r\n        O\r\n        P\r\n        R\r\n        S\r\n        T\r\n        U\r\n        V\r\n        W\r\n        X\r\n        Special characters\r\n        Reserved Words\r\n\r\n        A\r\n\r\n        abs() ? returns the absolute value of its numeric argument\r\n        acos() ? returns the arcus cosine of its numeric argument\r\n        and ? logical and, used in conditions\r\n        and() ? the bitwise arithmetic and\r\n        arraydim() ? returns the dimension of the array, which is passed as an a\r\nrray\r\n            reference\r\n        arraysize() ? returns the size of a dimension of an array\r\n        asc() ? accepts a string and returns the position of its first character\r\n within\r\n            the ascii charset\r\n        asin() ? returns the arcus sine of its numeric argument\r\n        at() ? can be used in the print-command to place the output at a specifi\r\ned\r\n            position\r\n        atan() ? returns the arctangent of its numeric argument\r\n\r\n        Name\r\n\r\n        abs() ? returns the absolute value of its numeric argument\r\n\r\n        Synopsis\r\n\r\n        y=abs(x)\r\n\r\n        Description\r\n\r\n        If the argument of the abs-function is positive (e.g. 2) it is returned\r\n        unchanged, if the argument is negative (e.g. -1) it is returned as a pos\r\nitive\r\n        value (e.g. 1).\r\n\r\n        Example\r\n\r\n        print abs(-2),abs(2)\r\n\r\n        This example will print 2 2\r\n\r\n        See also\r\n\r\n        sig\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        acos() ? returns the arcus cosine of its numeric argument\r\n\r\n        Synopsis\r\n\r\n        x=acos(angle)\r\n\r\n        Description\r\n\r\n        acos is the arcus cosine-function, i.e. the inverse of the cos-function.\r\n Or,\r\n        more elaborate: It Returns the angle (in radians, not degrees !), which,\r\n fed to\r\n        the cosine-function will produce the argument passed to the acos-functio\r\nn.\r\n\r\n        Example\r\n\r\n        print acos(0.5),acos(cos(pi))\r\n\r\n        This example will print 1.0472 3.14159 which are ?\/3 and ? respectively.\r\n\r\n        See also\r\n\r\n        cos, asin\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        and ? logical and, used in conditions\r\n\r\n        Synopsis\r\n\r\n        if (a and b) ?\r\n        while (a and b) ?\r\n\r\n        Description\r\n\r\n        Used in conditions (e.g within if, while or until) to join two expressio\r\nns.\r\n        Returns true, if and only if its left and right argument are both true a\r\nnd\r\n        false otherwise.\r\n\r\n        Note, that logical shortcuts may take place.\r\n\r\n        Example\r\n\r\n        input \"Please enter a number\" a\r\n        if (a&gt;=1 and a&lt;=9) print \"your input is between 1 and 9\"\r\n\r\n        See also\r\n\r\n        or,not\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        and() ? the bitwise arithmetic and\r\n\r\n        Synopsis\r\n\r\n        x=and(a,b)\r\n\r\n        Description\r\n\r\n        Used to compute the bitwise and of both its argument. Both arguments are\r\n        treated as binary numbers (i.e. a series of 0 and 1); a bit of the resul\r\nting\r\n        value will then be 1, if both arguments have a 1 at this position in the\r\nir\r\n        binary representation.\r\n\r\n        Note, that both arguments are silently converted to integer values and t\r\nhat\r\n        negative numbers have their own binary representation and may lead to\r\n        unexpected results when passed to and.\r\n\r\n        Example\r\n\r\n        print and(6,3)\r\n\r\n        This will print 2. This result is clear, if you note, that the binary\r\n        representation of 6 and 3 are 110 and 011 respectively; this will yield \r\n010 in\r\n        binary representation or 2 as decimal.\r\n\r\n        See also\r\n\r\n        or, eor and not\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        arraydim() ? returns the dimension of the array, which is passed as an a\r\nrray\r\n        reference\r\n\r\n        Synopsis\r\n\r\n        a=arraydim(b())\r\n\r\n        Description\r\n\r\n        If you apply the arraydim()-function on a one-dimensional array (i.e. a \r\nvector)\r\n        it will return 1, on a two-dimensional array (i.e. a matrix) it will ret\r\nurn 2,\r\n        and so on.\r\n\r\n        This is mostly used within subroutines, which expect an array among thei\r\nr\r\n        parameters. Such subroutines tend to use the arraydim-function to check,\r\n if the\r\n        array which has been passed, has the right dimension. E.g. a subroutine \r\nto\r\n        multiply two matrices may want to check, if it really is invoked with tw\r\no\r\n        2-dimensional arrays.\r\n\r\n        Example\r\n\r\n        dim a(10,10),b(10)\r\n        print arraydim(a()),arraydim(b())\r\n\r\n        This will print 2 1, which are the dimension of the arrays a() and b(). \r\nYou may\r\n        check out the function arraysize for a full-fledged example.\r\n\r\n        See also\r\n\r\n        arraysize and dim.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        arraysize() ? returns the size of a dimension of an array\r\n\r\n        Synopsis\r\n\r\n        x=arraysize(a(),b)\r\n\r\n        Description\r\n\r\n        The arraysize-function computes the size of a specified dimension of a\r\n        specified array. Here, size stands for the maximum number, that may be u\r\nsed as\r\n        an index for this array. The first argument to this function must be an\r\n        reference to an array, the second one specifies, which of the multiple\r\n        dimensions of the array should be taken to calculate the size.\r\n\r\n        An Example involving subroutines: Let's say, an array has been declared \r\nas dim\r\n        a(10,20) (that is a two-dimensional array or a matrix). If this array is\r\n passed\r\n        as an array reference to a subroutine, this sub will not know, what sort\r\n of\r\n        array has been passed. With the arraydim-function the sub will be able t\r\no find\r\n        the dimension of the array, with the arraysize-function it will be able \r\nto find\r\n        out the size of this array in its two dimensions, which will be 10 and 2\r\n0\r\n        respectively.\r\n\r\n        Our sample array is two dimensional; if you envision it as a matrix this\r\n matrix\r\n        has 10 lines and 20 columns (see the dim-statement above. To state it mo\r\nre\r\n        formally: The first dimension (lines) has a size of 10, the second dimen\r\nsion\r\n        (columns) has a size of 20; these numbers are those returned by arraysiz\r\ne(a\r\n        (),1) and arraysize(a(),2) respectively. Refer to the example below for \r\na\r\n        typical usage.\r\n\r\n        Example\r\n\r\n        rem\r\n        rem  This program adds two matrices elementwise.\r\n        rem\r\n\r\n        dim a(10,20),b(10,20),c(10,20)\r\n\r\n        rem  initialization of the arrays a() and b()\r\n        for y=1 to 10:for x=1 to 20\r\n           a(y,x)=int(ran(4)):b(y,x)=int(ran(4))\r\n        next x:next y\r\n\r\n        matadd(a(),b(),c())\r\n\r\n        print \"Result:\"\r\n        for x=1 to 20\r\n           for y=10 to 1 step -1\r\n              print c(y,x),\" \";\r\n           next y\r\n           print\r\n        next x\r\n\r\n        sub matadd(m1(),m2(),r())\r\n\r\n           rem  This sub will add the matrices m1() and m2()\r\n           rem  elementwise and store the result within r()\r\n           rem  This is not very useful but easy to implement.\r\n           rem  However, this sub excels in checking its arguments\r\n           rem  with arraydim() and arraysize()\r\n\r\n           local x:local y\r\n\r\n           if (arraydim(m1())&lt;&gt;2 or arraydim(m2())&lt;&gt;2 or arraydim(r())&lt;&gt;2) then\r\n              error \"Need two dimensional arrays as input\"\r\n           endif\r\n\r\n           y=arraysize(m1(),1):x=arraysize(m1(),2)\r\n           if (arraysize(m2(),1)&lt;&gt;y or arraysize(m2(),2)&lt;&gt;x) then\r\n              error \"The two matrices cannot be added elementwise\"\r\n           endif\r\n\r\n           if (arraysize(r(),1)&lt;&gt;y or arraysize(r(),2)&lt;&gt;x) then\r\n              error \"The result cannot be stored in the third argument\"\r\n           endif\r\n\r\n           local xx:local yy\r\n           for xx=1 to x\r\n              for yy=1 to y\r\n                 r(yy,xx)=m1(yy,xx)+m2(yy,xx)\r\n              next yy\r\n           next xx\r\n\r\n         end sub\r\n\r\n        See also\r\n\r\n        arraydim and dim.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        asc() ? accepts a string and returns the position of its first character\r\n within\r\n        the ascii charset\r\n\r\n        Synopsis\r\n\r\n        a=asc(char$)\r\n\r\n        Description\r\n\r\n        The asc-function accepts a string, takes its first character and looks i\r\nt up\r\n        within the ascii-charset; this position will be returned. The asc-functi\r\non is\r\n        the opposite of the chr$-function. There are valid uses for asc, however\r\n,\r\n        comparing strings (i.e. to bring them into alphabetical sequence) is not\r\n among\r\n        them; in such many cases you might consider to compare strings directly \r\nwith &lt;,\r\n        = and &gt; (rather than converting a string to a number and comparing this\r\n        number).\r\n\r\n        Example\r\n\r\n        input \"Please enter a letter between 'a' and 'y': \" a$\r\n        if (a$&lt;\"a\" or a$&gt;\"y\") print a$,\" is not in the proper range\":end\r\n        print \"The letter after \",a$,\" is \",chr$(asc(a$)+1)\r\n\r\n        See also\r\n\r\n        chr$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        asin() ? returns the arcus sine of its numeric argument\r\n\r\n        Synopsis\r\n\r\n        angle=asin(x)\r\n\r\n        Description\r\n\r\n        acos is the arcus sine-function, i.e. the inverse of the sin-function. O\r\nr, more\r\n        elaborate: It Returns the angle (in radians, not degrees !), which, fed \r\nto the\r\n        sine-function will produce the argument passed to the asin-function.\r\n\r\n        Example\r\n\r\n        print asin(0.5),asin(sin(pi))\r\n\r\n        This will print 0.523599 -2.06823e-13 which is ? and almost 0 respective\r\nly.\r\n\r\n        See also\r\n\r\n        sin, acos\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        at() ? can be used in the print-command to place the output at a specifi\r\ned\r\n        position\r\n\r\n        Synopsis\r\n\r\n        clear screen\r\n        ?\r\n        print at(a,b)\r\n        print @(a,b)\r\n\r\n        Description\r\n\r\n        The at-clause takes two numeric arguments (e.g. at(2,3)) and can be inse\r\nrted\r\n        after the print-keyword. at() can be used only if clear screen has been\r\n        executed at least once within the program (otherwise you will get an err\r\nor).\r\n\r\n        The two numeric arguments of the at-function may range from 0 to the wid\r\nth of\r\n        your terminal minus 1, and from 0 to the height of your terminal minus 1\r\n; if\r\n        any argument exceeds these values, it will be truncated accordingly. How\r\never,\r\n        yabasic has no influence on the size of your terminal (80x25 is a common\r\n, but\r\n        not mandatory), the size of your terminal and the maximum values accepta\r\nble\r\n        within the at-clause may vary. To get the size of your terminal you may \r\nuse the\r\n        peek-function: peek(\"screenwidth\") returns the width of your terminal an\r\nd peek\r\n        (\"screenheight\") its height.\r\n\r\n        Example\r\n\r\n        clear screen\r\n        maxx=peek(\"screenwidth\")-1:maxy=peek(\"screenheight\")-1\r\n        for x=0 to maxx\r\n          print at(x,maxy*(0.5+sin(2*pi*x\/maxx)\/2)) \"*\"\r\n        next x\r\n\r\n        This example plots a full period of the sine-function across the screen.\r\n\r\n        See also\r\n\r\n        print, clear screen, color\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        atan() ? returns the arctangent of its numeric argument\r\n\r\n        Synopsis\r\n\r\n        angle=atan(a,b)\r\n        angle=atan(a)\r\n\r\n        Description\r\n\r\n        atan is the arctangent-function, i.e. the inverse of the tan-function. O\r\nr, more\r\n        elaborate: It Returns the angle (in radians, not degrees !), which, fed \r\nto the\r\n        tan-function will produce the argument passed to the atan-function.\r\n\r\n        The atan-function has a second form, which accepts two arguments: atan(a\r\n,b)\r\n        which is (mostly) equivalent to atan(a\/b) except for the fact, that the\r\n        two-argument-form returns an angle in the range -? to ?, whereas the\r\n        one-argument-form returns an angle in the range -?\/2 to ?\/2. To understa\r\nnd this\r\n        you have to be good at math.\r\n\r\n        Example\r\n\r\n        print atan(1),atan(tan(pi)),atan(-0,-1),atan(-0,1)\r\n\r\n        This will print 0.463648 2.06823e-13 -3.14159 3.14159 which is ?\/4, almo\r\nst 0,\r\n        -? and ? respectively.\r\n\r\n        See also\r\n\r\n        tan, sin\r\n\r\n        B\r\n\r\n        backcolor ? change color for background of graphic window\r\n        backcolour ? see backcolor\r\n        beep ? ring the bell within your computer; a synonym for bell\r\n        bell ? ring the bell within your computer (just as beep)\r\n        bin$() ? converts a number into a sequence of binary digits\r\n        bind() ? Binds a yabasic-program and the yabasic-interpreter together in\r\nto a\r\n            standalone program.\r\n        box ? draw a rectangle. A synonym for rectangle\r\n        break ? breaks out of one or more loops or switch statements\r\n\r\n        Name\r\n\r\n        color ? change color for background of graphic window\r\n\r\n        Synopsis\r\n\r\n        backcolour red,green,blue\r\n        backcolour \"red,green,blue\"\r\n\r\n        Description\r\n\r\n        Change the color, that becomes visible, if any portion of the window is \r\nerased,\r\n        e.g. after clear window or clear line. Note however, that parts of the w\r\nindow,\r\n        that display the old background color will not change.\r\n\r\n        As with the color-command, the new background color can either be specif\r\nied as\r\n        a triple of three numbers or as a single string, that contains those thr\r\nee\r\n        numbers separated by commas.\r\n\r\n        Example\r\n\r\n        open window 255,255\r\n        for x=10 to 235 step 10:for y=10 to 235 step 10\r\n                backcolour x,y,0\r\n                clear window\r\n                sleep 1\r\n        next y:next x\r\n\r\n        This changes the background colour of the graphic window repeatedly and \r\nclears\r\n        it every time, so that it is filled with the new background colour.\r\n\r\n        See also\r\n\r\n        open window, color, line, rectangle, triangle, circle\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        backcolour ? see backcolor\r\n\r\n        Synopsis\r\n\r\n        backcolour red,green,blue\r\n        backcolour \"red,green,blue\"\r\n\r\n        See also\r\n\r\n        color\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        beep ? ring the bell within your computer; a synonym for bell\r\n\r\n        Synopsis\r\n\r\n        beep\r\n\r\n        Description\r\n\r\n        The bell-command rings the bell within your computer once. This command \r\nis not\r\n        a sound-interface, so you can neither vary the length or the height of t\r\nhe\r\n        sound (technically, it just prints \\a). bell is exactly the same as beep\r\n.\r\n\r\n        Example\r\n\r\n        beep:print \"This is a problem ...\"\r\n\r\n        See also\r\n\r\n        beep\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        bell ? ring the bell within your computer (just as beep)\r\n\r\n        Synopsis\r\n\r\n        bell\r\n\r\n        Description\r\n\r\n        The beep-command rings the bell within your computer once. beep is a syn\r\nonym\r\n        for bell.\r\n\r\n        Example\r\n\r\n        print \"This is a problem ...\":beep\r\n\r\n        See also\r\n\r\n        bell\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        bin$() ? converts a number into a sequence of binary digits\r\n\r\n        Synopsis\r\n\r\n        hexadecimal$=bin$(decimal)\r\n\r\n        Description\r\n\r\n        The bin$-function takes a single numeric argument an converts it into a \r\nstring\r\n        of binary digits (i.e. zeroes and ones). If you pass a negative number t\r\no bin$,\r\n        the resulting string will be preceded by a '-'.\r\n\r\n        If you want to convert the other way around (i.e. from binary to decimal\r\n) you\r\n        may use the dec-function.\r\n\r\n        Example\r\n\r\n        for a=1 to 100\r\n          print bin$(a)\r\n        next a\r\n\r\n        This example prints the binary representation of all digits between 1 an\r\nd 100.\r\n\r\n        See also\r\n\r\n        hex$, dec\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        bind() ? Binds a yabasic-program and the yabasic-interpreter together in\r\nto a\r\n        standalone program.\r\n\r\n        Synopsis\r\n\r\n        bind(\"foo.exe\")\r\n\r\n        Description\r\n\r\n        The bind-command combines your own yabasic-program (plus all the librari\r\nes it\r\n        does import) and the interpreter by copying them into a new file, whose \r\nname is\r\n        passed as an argument. This new program may then be executed on any comp\r\nuter,\r\n        even if it does not have yabasic installed.\r\n\r\n        Please see the section about creating a standalone-program for details.\r\n\r\n        Example\r\n\r\n        if (!peek(\"isbound\")) then\r\n          bind \"foo\"\r\n          print \"Successfully created the standalone executable 'foo' !\"\r\n          exit\r\n        endif\r\n\r\n        print \"Hello World !\"\r\n\r\n        This example creates a standalone program foo from itself.\r\n\r\n        See also\r\n\r\n        The section about creating a standalone-program, the peek-function and t\r\nhe\r\n        command line options.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        box ? draw a rectangle. A synonym for rectangle\r\n\r\n        Synopsis\r\n\r\n        See the rectangle-command.\r\n\r\n        Description\r\n\r\n        The box-command does exactly the same as the rectangle-command; it is ju\r\nst a\r\n        synonym. Therefore you should refer to the entry for the rectangle-comma\r\nnd for\r\n        further information.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        break ? breaks out of one or more loops or switch statements\r\n\r\n        Synopsis\r\n\r\n        break\r\n\r\n        break 2\r\n\r\n        Description\r\n\r\n        break transfers control immediately outside the enclosing loop or switch\r\n        statement. This is the preferred way of leaving a such a statement (rath\r\ner than\r\n        goto, which is still possible in most cases). An optional digit allows o\r\nne to\r\n        break out of multiple levels, e.g. to leave a loop from within a switch\r\n        statement. Please note, that only a literal (e.g. 2) is allowed at this\r\n        location.\r\n\r\n        Example\r\n\r\n        for a=1 to 10\r\n          break\r\n          print \"Hi\"\r\n        next a\r\n\r\n        while(1)\r\n          break\r\n          print \"Hi\"\r\n        wend\r\n\r\n        repeat\r\n          break\r\n          print \"Hi\"\r\n        until(0)\r\n\r\n        switch 1\r\n        case 1:break\r\n        case 2:case 3:print \"Hi\"\r\n        end switch\r\n\r\n        This example prints nothing at all, because each of the loops (and the\r\n        switch-statement) does an immediate break (before it could print any \"Hi\r\n\").\r\n\r\n        See also\r\n\r\n        for, while, repeat and switch.\r\n\r\n        C\r\n\r\n        case ? mark the different cases within a switch-statement\r\n        ceil() ? compute the ceiling for its (float) argument.\r\n        chomp$() ? Remove a single trailing newline from its string-argument; if\r\n the\r\n            string does not end in a newline, the string is returned unchanged.\r\n        chr$() ? accepts a number and returns the character at this position wit\r\nhin the\r\n            ascii charset\r\n        circle ? draws a circle in the graphic-window\r\n        clear ? Erase circles, rectangles or triangles\r\n        clear screen ? erases the text window\r\n        clear window ? clear the graphic window and begin a new page, if printin\r\ng is\r\n            under way\r\n        close ? close a file, which has been opened before\r\n        close curve ? close a curve, that has been drawn by the line-command\r\n        close printer ? stops printing of graphics\r\n        close window ? close the graphics-window\r\n        color ? change color for any subsequent drawing-command\r\n        colour ? see color\r\n        compile ? compile a string with yabasic-code on the fly\r\n        continue ? start the next iteration of a for-, do-, repeat- or while-loo\r\np\r\n        cos() ? return the cosine of its single argument\r\n\r\n        Name\r\n\r\n        case ? mark the different cases within a switch-statement\r\n\r\n        Synopsis\r\n\r\n        switch a\r\n          case 1\r\n          case 2\r\n          ?\r\n        end switch\r\n\r\n        ?\r\n\r\n        switch a$\r\n          case \"a\"\r\n          case \"b\"\r\n          ?\r\n        end switch\r\n\r\n        Description\r\n\r\n        Please see the switch-statement.\r\n\r\n        Example\r\n\r\n        input a\r\n        switch(a)\r\n          case 1:print \"one\":break\r\n          case 2:print \"two\":break\r\n          default:print \"more\"\r\n        end switch\r\n\r\n        Depending on your input (a number is expected) this code will print one \r\nor two\r\n        or otherwise more.\r\n\r\n        See also\r\n\r\n        switch\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        ceil() ? compute the ceiling for its (float) argument.\r\n\r\n        Synopsis\r\n\r\n        print ceil(x)\r\n\r\n        Description\r\n\r\n        The ceil-function returns the smallest integer number, that is larger or\r\n equal\r\n        than its argument.\r\n\r\n        Example\r\n\r\n        print ceil(1.5),floor(1.5)\r\n        print ceil(2),floor(2)\r\n\r\n        Comparing functions ceil and floor, gives a first line of output (1 2), \r\nshowing\r\n        that ceil is less or equal than floor; but as the second line of output \r\n(2 2)\r\n        shows, the two functions give equal results for integer arguments.\r\n\r\n        See also\r\n\r\n        floor, int, frac\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        chomp$() ? Remove a single trailing newline from its string-argument; if\r\n the\r\n        string does not end in a newline, the string is returned unchanged.\r\n\r\n        Synopsis\r\n\r\n        print chomp$(\"Hallo !\\n\")\r\n\r\n        Description\r\n\r\n        The chomp$-function checks, if its string-argument ends in a newline and\r\n        removes it eventually; for this purpose chomp$ can replace an if-stateme\r\nnt.\r\n        This can be especially useful, when you deal with input from external so\r\nurces\r\n        like system$.\r\n\r\n        You may apply chomp$ freely, as it only acts, if there is a newline to r\r\nemove;\r\n        note however, that user-input, that comes from the normal input-statemen\r\nt, does\r\n        not need such a treatment, because it already comes without a newline.\r\n\r\n        Example\r\n\r\n        The following yabasic-program uses the unix-command whoami to get the us\r\nername\r\n        of the current user in order to greet him personally. This is done twice\r\n: First\r\n        with the chomp$-function and then again with with an equivalent if-state\r\nment:\r\n\r\n        print \"Hello \" + chomp$(system$(\"whoami\")) + \" !\"\r\n\r\n        user$ = system$(\"whoami\")\r\n        if (right$(user$,1)=\"\\n\") user$=left$(user$,len(user$)-1)\r\n        print \"Hello again \" + user$ + \" !\"\r\n\r\n        See also\r\n\r\n        system$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        chr$() ? accepts a number and returns the character at this position wit\r\nhin the\r\n        ascii charset\r\n\r\n        Synopsis\r\n\r\n        character$=chr$(ascii)\r\n\r\n        Description\r\n\r\n        The chr$-function is the opposite of the asc-function. It looks up and r\r\neturns\r\n        the character at the given position within the ascii-charset. It's typic\r\nal use\r\n        is to construct nonprintable characters which do not occur on your keybo\r\nard.\r\n\r\n        Nevertheless you won't use chr$ as often as you might think, because the\r\n most\r\n        important nonprintable characters can be constructed using escape-sequen\r\nces\r\n        using the \\-character (e.g. you might use \\n instead of chr$(10) whereve\r\nr you\r\n        want to use the newline-character).\r\n\r\n        Example\r\n\r\n        print \"a\",chr$(10),\"b\"\r\n\r\n        This will print the letters 'a' and 'b' in different lines because of th\r\ne\r\n        intervening newline-character, which is returned by chr$(10).\r\n\r\n        See also\r\n\r\n        asc\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        circle ? draws a circle in the graphic-window\r\n\r\n        Synopsis\r\n\r\n        circle x,y,r\r\n        clear circle x,y,r\r\n        fill circle x,y,r\r\n        clear fill circle x,y,r\r\n\r\n        Description\r\n\r\n        The circle-command accepts three parameters: The x- and y-coordinates of\r\n the\r\n        center and the radius of the circle.\r\n\r\n        Some more observations related with the circle-command:\r\n\r\n          * The graphic-window must have been opened already.\r\n\r\n          * The circle may well extend over the boundaries of the window.\r\n\r\n          * If you have issued open printer before, the circle will finally appe\r\nar in\r\n            the printed hard copy of the window.\r\n\r\n          * fill circle will draw a filled (with black ink) circle.\r\n\r\n          * clear circle will erase (or clear) the outline of the circle.\r\n\r\n          * clear fill circle or fill clear circle will erase the full area of t\r\nhe\r\n            circle.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n\r\n        for n=1 to 2000\r\n          x=ran(200)\r\n          y=ran(200)\r\n          fill circle x,y,10\r\n          clear fill circle x,y,8\r\n        next n\r\n\r\n        This code will open a window and draw 2000 overlapping circles within. E\r\nach\r\n        circle is drawn in two steps: First it is filled with black ink (fill ci\r\nrcle\r\n        x,y,10), then most of this circle is erased again (clear fill circle x,y\r\n,8). As\r\n        a result each circle is drawn with an opaque white interior and a 2-pixe\r\nl\r\n        outline (2-pixel, because the radii differ by two).\r\n\r\n        See also\r\n\r\n        open window, open printer, line, rectangle, triangle\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        clear ? Erase circles, rectangles or triangles\r\n\r\n        Synopsis\r\n\r\n        clear rectangle 10,10,90,90\r\n        clear fill circle 50,50,20\r\n        clear triangle 10,10,20,20,50,30\r\n\r\n        Description\r\n\r\n        May be used within the circle, rectangle or triangle command and causes \r\nthese\r\n        shapes to be erased (i.e. be drawn in the colour of the background).\r\n\r\n        fill can be used in conjunction with and wherever the fill-clause may ap\r\npear.\r\n        Used alone, clear will erase the outline (not the interior) of the shape\r\n        (circle, rectangle or triangle); together with fill the whole shape (inc\r\nluding\r\n        its interior) is erased.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        fill circle 100,100,50\r\n        clear fill rectangle 10,10,90,90\r\n\r\n        This opens a window and draws a pacman-like figure.\r\n\r\n        See also\r\n\r\n        clear, circle, rectangle, triangle\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        clear screen ? erases the text window\r\n\r\n        Synopsis\r\n\r\n        clear screen\r\n\r\n        Description\r\n\r\n        clear screen erases the text window (the window where the output of prin\r\nt\r\n        appears).\r\n\r\n        It must be issued at least once, before some advanced screen-commands (e\r\n.g.\r\n        print at or inkey$) may be called; this requirement is due to some limit\r\nations\r\n        of the curses-library, which is used by yabasic under Unix for some comm\r\nands.\r\n\r\n        Example\r\n\r\n        clear screen\r\n        print \"Please press a key : \";\r\n        a$=inkey$\r\n        print a$\r\n\r\n        The clear screen command is essential here; if it would be omitted, yaba\r\nsic\r\n        would issue an error (\"need to call 'clear screen' first\") while trying \r\nto\r\n        execute the inkey$-function.\r\n\r\n        See also\r\n\r\n        inkey$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        clear window ? clear the graphic window and begin a new page, if printin\r\ng is\r\n        under way\r\n\r\n        Synopsis\r\n\r\n        clear window\r\n\r\n        Description\r\n\r\n        clear window clears the graphic window. If you have started printing the\r\n        graphic via open printer, the clear window-command starts a new page as \r\nwell.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        open printer \"t.ps\"\r\n\r\n        for a=1 to 10\r\n        if (a&gt;1) clear window\r\n        text 100,100,\"Hallo \"+str$(a)\r\n        next a\r\n\r\n        close printer\r\n        close window\r\n\r\n        This example prints 10 pages, with the text \"Hello 1\", \"Hello 2\", ? and \r\nso on.\r\n        The clear screen-command clears the graphics window and starts a new pag\r\ne.\r\n\r\n        See also\r\n\r\n        open window, open printer\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        close ? close a file, which has been opened before\r\n\r\n        Synopsis\r\n\r\n        close filenum\r\n        close # filenum\r\n\r\n        Description\r\n\r\n        The close-command closes an open file. You should issue this command as \r\nsoon as\r\n        you are done with reading from or writing to a file.\r\n\r\n        Example\r\n\r\n        open \"my.data\" for reading as 1\r\n        input #1 a\r\n        print a\r\n        close 1\r\n\r\n        This program opens the file \"my.data\", reads a number from it, prints th\r\nis\r\n        number and closes the file again.\r\n\r\n        See also\r\n\r\n        open\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        close curve ? close a curve, that has been drawn by the line-command\r\n\r\n        Synopsis\r\n\r\n        new curve\r\n        line to x1,y1\r\n        ?\r\n        close curve\r\n\r\n        Description\r\n\r\n        The close curve-command closes a sequence of lines, that has been drawn \r\nby\r\n        repeated line to-commands.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        new curve\r\n        line to 100,50\r\n        line to 150,150\r\n        line to 50,150\r\n        close curve\r\n\r\n        This example draws a triangle: The three line to-commands draw two lines\r\n; the\r\n        final line is however not drawn explicitly, but drawn by the close\r\n        curve-command.\r\n\r\n        See also\r\n\r\n        line, new curve\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        close printer ? stops printing of graphics\r\n\r\n        Synopsis\r\n\r\n        close printer\r\n\r\n        Description\r\n\r\n        The close printer-command ends the printing graphics. Between open print\r\ner and\r\n        close printer everything you draw (e.g. circles, lines ?) is sent to you\r\nr\r\n        printer. close printer puts an end to printing and will make your printe\r\nr eject\r\n        the page.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        open printer\r\n        circle 100,100,50\r\n        close printer\r\n        close window\r\n\r\n        As soon as close printer is executed, your printer will eject a page wit\r\nh a\r\n        circle on it.\r\n\r\n        See also\r\n\r\n        open printer\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        close window ? close the graphics-window\r\n\r\n        Synopsis\r\n\r\n        close window\r\n\r\n        Description\r\n\r\n        The close window-command closes the graphics-window, i.e. it makes it di\r\nsappear\r\n        from your screen. It includes an implicit close printer, if a printer ha\r\ns been\r\n        opened previously.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        circle 100,100,50\r\n        close window\r\n\r\n        This example will open a window, draw a circle and close the window agai\r\nn; all\r\n        this without any pause or delay, so the window will be closed before you\r\n may\r\n        regard the circle..\r\n\r\n        See also\r\n\r\n        open window\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        color ? change color for any subsequent drawing-command\r\n\r\n        Synopsis\r\n\r\n        colour red,green,blue\r\n        colour \"red,green,blue\"\r\n\r\n        Description\r\n\r\n        Change the color, in which lines, dots, circles, rectangles or triangles\r\n are\r\n        drawn. The color-command accepts three numbers in the range 0 ? 255 (as \r\nin the\r\n        first line of the synopsis above). Those numbers specify the intensity f\r\nor the\r\n        primary colors red, green and blue respectively. As an example 255,0,0 i\r\ns red\r\n        and 255,255,0 is yellow.\r\n\r\n        Alternatively you may specify the color with a single string (as in the \r\nsecond\r\n        line of the synopsis above); this string should contain three numbers,\r\n        separated by commas. As an example \"255,0,255\" would be violet. Using th\r\nis\r\n        variant of the colour-command, you may use symbolic names for colours:\r\n\r\n        open window 100,100\r\n        yellow$=\"255,255,0\"\r\n        color yellow$\r\n        text 50,50,\"Hallo\"\r\n\r\n        , which reads much clearer.\r\n\r\n        Example\r\n\r\n        open window 255,255\r\n        for x=10 to 235 step 10:for y=10 to 235 step 10\r\n                colour x,y,0\r\n                fill rectangle x,y,x+10,y+10\r\n        next y:next x\r\n\r\n        This fills the window with colored rectangles. However, none of the used\r\n        colours contains any shade of blue, because the color-command has always\r\n 0 as a\r\n        third argument.\r\n\r\n        See also\r\n\r\n        open window, backcolor, line, rectangle, triangle, circle\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        colour ? see color\r\n\r\n        Synopsis\r\n\r\n        colour red,green,blue\r\n        colour \"red,green,blue\"\r\n\r\n        See also\r\n\r\n        color\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        compile ? compile a string with yabasic-code on the fly\r\n\r\n        Synopsis\r\n\r\n        compile(code$)\r\n\r\n        Description\r\n\r\n        This is an advanced command (closely related with the execute-command). \r\nIt\r\n        allows you to compile a string of yabasic-code (which is the only argume\r\nnt).\r\n        Afterwards the compiled code is a normal part of your program.\r\n\r\n        Note, that there is no way to remove the compiled code.\r\n\r\n        Example\r\n\r\n        compile(\"sub mysub(a):print a:end sub\")\r\n        mysub(2)\r\n\r\n        This example creates a function named mysub, which simply prints its sin\r\ngle\r\n        argument.\r\n\r\n        See also\r\n\r\n        execute\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        continue ? start the next iteration of a for-, do-, repeat- or while-loo\r\np\r\n\r\n        Synopsis\r\n\r\n        continue\r\n\r\n        Description\r\n\r\n        You may use continue within any loop to start the next iteration immedia\r\ntely.\r\n        Depending on the type of the loop, the loop-condition will or will not b\r\ne\r\n        checked. Especially: for- and while-loops will evaluate their respective\r\n        conditions, do- and repeat-loops will not.\r\n\r\n        Remark: Another way to change the flow of execution within a loop, is th\r\ne\r\n        break-command.\r\n\r\n        Example\r\n\r\n        for a=1 to 100\r\n          if mod(a,2)=0 continue\r\n          print a\r\n        next a\r\n\r\n        This example will print all odd numbers between 1 and 100.\r\n\r\n        See also\r\n\r\n        for, do, repeat, while, break\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        cos() ? return the cosine of its single argument\r\n\r\n        Synopsis\r\n\r\n        x=cos(angle)\r\n\r\n        Description\r\n\r\n        The cos-function expects an angle (in radians) and returns its cosine.\r\n\r\n        Example\r\n\r\n        print cos(pi)\r\n\r\n        This example will print -1.\r\n\r\n        See also\r\n\r\n        acos, sin\r\n\r\n        D\r\n\r\n        data ? introduces a list of data-items\r\n        date$ ? returns a string with various components of the current date\r\n        dec() ? convert a base 2 or base 16 number into decimal form\r\n        default ? mark the default-branch within a switch-statement\r\n        dim ? create an array prior to its first use\r\n        do ? start a (conditionless) do-loop\r\n        doc ? special comment, which might be retrieved by the program itself\r\n        docu$ ? special array, containing the contents of all docu-statement wit\r\nhin the\r\n            program\r\n        dot ? draw a dot in the graphic-window\r\n\r\n        Name\r\n\r\n        data ? introduces a list of data-items\r\n\r\n        Synopsis\r\n\r\n        data 9,\"world\"\r\n        ?\r\n        read b,a$\r\n\r\n        Description\r\n\r\n        The data-keyword introduces a list of comma-separated list of strings or\r\n        numbers, which may be retrieved with the read-command.\r\n\r\n        The data-command itself does nothing; it just stores data. A single\r\n        data-command may precede an arbitrarily long list of values, in which st\r\nrings\r\n        or numbers may be mixed at will.\r\n\r\n        yabasic internally uses a data-pointer to keep track of the current loca\r\ntion\r\n        within the data-list; this pointer may be reset with the restore-command\r\n.\r\n\r\n        Example\r\n\r\n        do\r\n          restore\r\n          for a=1 to 4\r\n            read num$,num\r\n            print num$,\"=\",num\r\n          next a\r\n        loop\r\n        data \"eleven\",11,\"twelve\",12,\"thirteen\",13,\"fourteen\",14\r\n\r\n        This example just prints a series of lines eleven=11 up to fourteen=14 a\r\nnd so\r\n        on without end.\r\n\r\n        The restore-command ensures that the list of data-items is read from the\r\n start\r\n        with every iteration.\r\n\r\n        See also\r\n\r\n        read, restore\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        date$ ? returns a string with various components of the current date\r\n\r\n        Synopsis\r\n\r\n        a$=date$\r\n\r\n        Description\r\n\r\n        The date$-function (which must be called without parentheses; i.e. date$\r\n()\r\n        would be an error) returns a string containing various components of a d\r\nate; an\r\n        example would be 4-05-27-2004-Thu-May. This string consists of various f\r\nields\r\n        separated by hyphens (\"-\"):\r\n\r\n          * The day within the week as a number in the range 0 (=Sunday) to 6 (=\r\n            Saturday) (in the example above: 4, i.e. Thursday).\r\n\r\n          * The month as a number in the range 1 (=January) to 12 (=December) (i\r\nn the\r\n            example: 5 which stands for May).\r\n\r\n          * The day within the month as a number in the range 1 to 31 (in the ex\r\nample:\r\n            27).\r\n\r\n          * The full, 4-digit year (in the example: 2004, which reminds me that \r\nI\r\n            should adjust the clock within my computer ?).\r\n\r\n          * The abbreviated name of the day within the week (Mon to Sun).\r\n\r\n          * The abbreviated name of the month (Jan to Dec).\r\n\r\n        Therefore the whole example above (4-05-27-2004-Thu-May) would read: day\r\n 4 in\r\n        the week (counting from 0), May 27 in the year 2004, which is a Thursday\r\n in\r\n        May.\r\n\r\n        Note, that all fields within the string returned by date$ have a fixed w\r\nith\r\n        (numbers are padded with zeroes); therefore it is easy to extract the va\r\nrious\r\n        fields of a date format with mid$.\r\n\r\n        Example\r\n\r\n        rem   Two ways to print the same ...\r\n\r\n        print mid$(date$,3,10)\r\n\r\n        dim fields$(6)\r\n        a=split(date$,fields$(),\"-\")\r\n        print fields$(2),\"-\",fields$(3),\"-\",fields$(4)\r\n\r\n        This example shows two different techniques to extract components from t\r\nhe\r\n        value returned by date$. The mid$-function is the preferred way, but you\r\n could\r\n        just as well split the return-value of date$ at every \"-\" and store the \r\nresult\r\n        within an array of strings.\r\n\r\n        See also\r\n\r\n        time$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        dec() ? convert a base 2 or base 16 number into decimal form\r\n\r\n        Synopsis\r\n\r\n        a=dec(number$)\r\n        a=dec(number$,base)\r\n\r\n        Description\r\n\r\n        The dec-function takes the string-representation of a base-2 or base-16 \r\n(which\r\n        is the default) number and converts it into a decimal number. The option\r\nal\r\n        second argument (base) might be used to specify a base other than 16. Ho\r\nwever,\r\n        currently only base 2 or base 16 are supported. Please note, that for ba\r\nse 16\r\n        you may write literals in the usual way, by preceding them with 0x, e.g.\r\n like\r\n\r\n        print 0xff\r\n\r\n        ; this may save you from applying the dec altogether.\r\n\r\n        Example\r\n\r\n        input \"Please enter a binary number: \" a$\r\n        print a$,\" is \",dec(a$)\r\n\r\n        See also\r\n\r\n        bin$, hex$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        default ? mark the default-branch within a switch-statement\r\n\r\n        Synopsis\r\n\r\n        switch a+3\r\n        case 1\r\n          ?\r\n        case 2\r\n          ?\r\n        default\r\n          ?\r\n        end switch\r\n\r\n        Description\r\n\r\n        The default-clause is an optional part of the switch-statement (see ther\r\ne for\r\n        more information). It introduces a series of statements, that should be\r\n        executed, if none of the cases matches, that have been specified before \r\n(each\r\n        with its own case-clause).\r\n\r\n        So default specifies a default to be executed, if none of the explicitly\r\n named\r\n        cases matches; hence its name.\r\n\r\n        Example\r\n\r\n        print \"Please enter a number between 0 and 6,\"\r\n        print \"specifying a day in the week.\"\r\n        input d\r\n        switch d\r\n        case 0:print \"Monday\":break\r\n        case 1:print \"Tuesday\":break\r\n        case 2:print \"Wednesday\":break\r\n        case 3:print \"Thursday\":break\r\n        case 4:print \"Friday\":break\r\n        case 5:print \"Saturday\":break\r\n        case 6:print \"Sunday\":break\r\n        default:print \"Hey you entered something invalid !\"\r\n        end switch\r\n\r\n        This program translates a number between 0 and 6 into the name of a week\r\nday;\r\n        the default-case is used to detect (and complain about) invalid input.\r\n\r\n        See also\r\n\r\n        sub, case\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        dim ? create an array prior to its first use\r\n\r\n        Synopsis\r\n\r\n        dim array(x,y)\r\n        dim array$(x,y)\r\n\r\n        Description\r\n\r\n        The dim-command prepares one or more arrays (of either strings or number\r\ns) for\r\n        later use. This command can also be used to enlarges an existing array.\r\n\r\n        When an array is created with the dim-statement, memory is allocated and\r\n all\r\n        elements are initialized with either 0 (for numerical arrays) or \"\" (for\r\n string\r\n        arrays).\r\n\r\n        If the array already existed, and the dim-statement specifies a larger s\r\nize\r\n        than the current size, the array is enlarged and any old content is pres\r\nerved.\r\n\r\n        Note, that dim cannot be used to shrink an array: If you specify a size,\r\n that\r\n        is smaller than the current size, the dim-command does nothing.\r\n\r\n        Finally: To create an array, that is only known within a single subrouti\r\nne, you\r\n        should use the command local, which creates local variables as well as l\r\nocal\r\n        arrays.\r\n\r\n        Example\r\n\r\n        dim a(5,5)\r\n        for x=1 to 5:for y=1 to 5\r\n          a(x,y)=int(ran(100))\r\n        next y:next x\r\n        printmatrix(a())\r\n        dim a(7,7)\r\n        printmatrix(a())\r\n\r\n        sub printmatrix(ar())\r\n          local x,y,p,q\r\n          x=arraysize(ar(),1)\r\n          y=arraysize(ar(),2)\r\n          for q=1 to y\r\n            for p=1 to y\r\n              print ar(p,q),\"\\t\";\r\n            next p\r\n            print\r\n          next q\r\n        end sub\r\n\r\n        This example creates a 2-dimensional array (i.e. a matrix) with the\r\n        dim-statement and fills it with random numbers. The second dim-statement\r\n        enlarges the array, all new elements are filled with 0.\r\n\r\n        The subroutine printmatrix just does, what its name says.\r\n\r\n        See also\r\n\r\n        arraysize, arraydim, local\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        do ? start a (conditionless) do-loop\r\n\r\n        Synopsis\r\n\r\n        do\r\n        ?\r\n        loop\r\n\r\n        Description\r\n\r\n        Starts a loop, which is terminated by loop; everything between do and lo\r\nop will\r\n        be repeated forever. This loop has no condition, so it is an infinite lo\r\nop;\r\n        note however, that a break- or goto-statement might be used to leave thi\r\ns loop\r\n        anytime.\r\n\r\n        Example\r\n\r\n        do\r\n          a=a+1\r\n          print a\r\n          if (a&gt;100) break\r\n        loop\r\n\r\n        This example prints the numbers between 1 and 101. The break-statement i\r\ns used\r\n        to leave the loop.\r\n\r\n        See also\r\n\r\n        loop, repeat, while, break\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        doc ? special comment, which might be retrieved by the program itself\r\n\r\n        Synopsis\r\n\r\n        doc   This is a comment\r\n        docu  This is another comment\r\n\r\n        Description\r\n\r\n        Introduces a comment, which spans up to the end of the line. But other t\r\nhan the\r\n        rem-comment, any docu-comment is collected within the special docu$-arra\r\ny and\r\n        might be retrieved later on. Moreover you might invoke yabasic -docu foo\r\n.yab on\r\n        the command line to retrieve the embedded documentation within the progr\r\nam\r\n        foo.yab.\r\n\r\n        Instead of doc you may just as well write docu or even documentation.\r\n\r\n        Example\r\n\r\n        rem   Hi, this has been written by me\r\n        rem\r\n        doc   This program asks for a number and\r\n        doc   prints this number multiplied with 2\r\n        rem\r\n        rem   Print out rhe above message\r\n        for a=1 to arraysize(docu$()):print docu$(a):next a\r\n\r\n        rem   Read and print the number\r\n        input \"Please input a number: \" x\r\n        print x*2\r\n\r\n        This program uses the comments within its code to print out a help messa\r\nge for\r\n        the user.\r\n\r\n        The contents of the doc-lines are retrieved from the docu$-array; if you\r\n do not\r\n        want a comment to be collected within this array, use the rem-statement\r\n        instead.\r\n\r\n        See also\r\n\r\n        docu$, rem\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        docu$ ? special array, containing the contents of all docu-statement wit\r\nhin the\r\n        program\r\n\r\n        Synopsis\r\n\r\n        a$=docu$(1)\r\n\r\n        Description\r\n\r\n        Before your program is executed, yabasic collects the content of all the\r\n        doc-statements within your program within this 1-dimensional array (well\r\n only\r\n        those within the main-program, libraries are skipped).\r\n\r\n        You may use the arraysize function to find out, how many lines it contai\r\nns.\r\n\r\n        Example\r\n\r\n        docu\r\n        docu  This program reads two numbers\r\n        docu  and adds them.\r\n        docu\r\n\r\n        rem retrieve and print the embedded documentation\r\n        for a=1 to arraysize(docu$(),1)\r\n          print docu$(a)\r\n        next a\r\n\r\n        input \"First number: \" b\r\n        input \"Second number: \" c\r\n\r\n        print \"The sum of \",b,\" and \",c,\" is \",b+c\r\n\r\n        This program uses the embedded documentation to issue a usage-message.\r\n\r\n        See also\r\n\r\n        arraydim, rem\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        dot ? draw a dot in the graphic-window\r\n\r\n        Synopsis\r\n\r\n        dot x,y\r\n        clear dot x,y\r\n\r\n        Description\r\n\r\n        Draws a dot at the specified coordinates within your graphic-window. If\r\n        printing is in effect, the dot appears on your printout too.\r\n\r\n        Use the functions peek(\"winheight\") or peek(\"winwidth\") to get the size \r\nof your\r\n        window and hence the boundaries of the coordinates specified for the\r\n        dot-command.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        circle 100,100,100\r\n        do\r\n          x=ran(200):y=ran(200)\r\n          dot x,y\r\n          total=total+1\r\n          if (sqrt((x-100)^2+(y-100)^2)&lt;100) in=in+1\r\n          print 4*in\/total\r\n        loop\r\n\r\n        This program uses a well known algorithm to compute ?.\r\n\r\n        See also\r\n\r\n        line, open window\r\n\r\n        E\r\n\r\n        else ? mark an alternative within an if-statement\r\n        elsif ? starts an alternate condition within an if-statement\r\n        end ? terminate your program\r\n        endif ? ends an if-statement\r\n        end sub ? ends a subroutine definition\r\n        eof ? check, if an open file contains data\r\n        eor() ? compute the bitwise exclusive or of its two arguments\r\n        error ? raise an error and terminate your program\r\n        euler ? another name for the constant 2.71828182864\r\n        execute$() ? execute a user defined subroutine, which must return a stri\r\nng\r\n        execute() ? execute a user defined subroutine, which must return a numbe\r\nr\r\n        exit ? terminate your program\r\n        exp() ? compute the exponential function of its single argument\r\n        export ? mark a function as globally visible\r\n\r\n        Name\r\n\r\n        else ? mark an alternative within an if-statement\r\n\r\n        Synopsis\r\n\r\n        if (?) then\r\n          ?\r\n        else\r\n          ?\r\n        endif\r\n\r\n        Description\r\n\r\n        The else-statement introduces the alternate branch of an if-statement. I\r\n.e. it\r\n        starts the sequence of statements, which is executed, if the condition o\r\nf the\r\n        if-statement is not true.\r\n\r\n        Example\r\n\r\n        input \"Please enter a number: \" a\r\n        if (mod(a,2)=1) then\r\n          print a,\" is odd.\"\r\n        else\r\n          print a,\" is even.\"\r\n        endif\r\n\r\n        This program detects, if the number you have entered is even or odd.\r\n\r\n        See also\r\n\r\n        if\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        elsif ? starts an alternate condition within an if-statement\r\n\r\n        Synopsis\r\n\r\n        if (?) then\r\n          ?\r\n        elseif (?)\r\n          ?\r\n        elsif (?) then\r\n          ?\r\n        else\r\n          ?\r\n        endif\r\n\r\n        Description\r\n\r\n        The elsif-statement is used to select a single alternative among a serie\r\ns of\r\n        choices.\r\n\r\n        With each elsif-statement you may specify a condition, which is tested, \r\nif the\r\n        main condition (specified with the if-statement) has failed. Note that e\r\nlsif\r\n        might be just as well written as elseif.\r\n\r\n        Within the example below, two variables a and b are tested against a ran\r\nge of\r\n        values. The variable a is tested with the elsif-statement. The very same\r\n tests\r\n        are performed for the variable b too; but here an involved series of\r\n        if-else-statements is employed, making the tests much more obscure.\r\n\r\n        Example\r\n\r\n        input \"Please enter a number: \" a\r\n        if (a&lt;0) then\r\n          print \"less than 0\"\r\n        elseif (a&lt;=10) then\r\n          print \"between 0 and 10\"\r\n        elsif (a&lt;=20)\r\n          print \"between 11 and 20\"\r\n        else\r\n          print \"over 20\"\r\n        endif\r\n\r\n        input \"Please enter another number: \" b\r\n        if (b&lt;0) then\r\n          print \"less than 0\"\r\n        else\r\n          if (b&lt;=10) then\r\n            print \"between 0 and 10\"\r\n          else\r\n            if (b&lt;=20) then\r\n              print \"between 11 and 20\"\r\n            else\r\n              print \"over 20\"\r\n            endif\r\n          endif\r\n        endif\r\n\r\n        Note, that the very same tests are performed for the variables a and b, \r\nbut can\r\n        be stated much more clearly with the elsif-statement.\r\n\r\n        Note, that elsif might be written as elseif too, and that the keyword th\r\nen is\r\n        optional.\r\n\r\n        See also\r\n\r\n        if, else\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        end ? terminate your program\r\n\r\n        Synopsis\r\n\r\n        end\r\n\r\n        Description\r\n\r\n        Terminate your program. Much (but not exactly) like the exit command.\r\n\r\n        Note, that end may not end your program immediately; if you have opened \r\na\r\n        window or called clear screen, yabasic assumes, that your user wants to \r\nstudy\r\n        the output of your program after it has ended; therefore it issues the l\r\nine\r\n        ---Program done, press RETURN--- and waits for a key to be pressed. If y\r\nou do\r\n        not like this behaviour, consider using exit.\r\n\r\n        Example\r\n\r\n        print \"Do you want to continue ?\"\r\n        input \"Please answer y(es) or n(o): \" a$\r\n        if (lower$(left$(a$,1))=\"n\") then\r\n          print \"bye\"\r\n          end\r\n        fi\r\n\r\n        See also\r\n\r\n        exit\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        endif ? ends an if-statement\r\n\r\n        Synopsis\r\n\r\n        if (?) then\r\n          ?\r\n        endif\r\n\r\n        Description\r\n\r\n        The endif-statement closes (or ends) an if-statement.\r\n\r\n        Note, that endif may be written in a variety of other ways: end if, end-\r\nif or\r\n        even fi.\r\n\r\n        The endif-statement must be omitted, if the if-statement does not contai\r\nn the\r\n        keyword then (see the example below). Such an if-statement without endif\r\n        extends only over a single line.\r\n\r\n        Example\r\n\r\n        input \"A number please: \" a\r\n        if (a&lt;10) then\r\n          print \"Your number is less than 10.\"\r\n        endif\r\n\r\n        REM  and now without endif\r\n\r\n        input \"A number please: \" a\r\n        if (a&lt;10) print \"Your number is less than 10.\"\r\n\r\n        See also\r\n\r\n        if\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        end sub ? ends a subroutine definition\r\n\r\n        Synopsis\r\n\r\n        sub foo(?)\r\n          ?\r\n        end sub\r\n\r\n        Description\r\n\r\n        Marks the end of a subroutine-definition (which starts with the sub-keyw\r\nord).\r\n        The whole concept of subroutines is explained within the entry for sub.\r\n\r\n        Example\r\n\r\n        print foo(3)\r\n\r\n        sub foo(a)\r\n          return a*2\r\n        end sub\r\n\r\n        This program prints out 6. The subroutine foo simply returns twice its\r\n        argument.\r\n\r\n        See also\r\n\r\n        sub\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        eof ? check, if an open file contains data\r\n\r\n        Synopsis\r\n\r\n        open 1,\"foo.bar\"\r\n        if (eof(1)) then\r\n           ?\r\n        end if\r\n\r\n        Description\r\n\r\n        The eof-function checks, if there is still data left within an open file\r\n. As an\r\n        argument it expects the file-number as returned by (or used within) the\r\n        open-function (or statement).\r\n\r\n        Example\r\n\r\n        a=open(\"foo.bar\")\r\n        while(not eof(a))\r\n          input #a,a$\r\n          print a$\r\n        end while\r\n\r\n        This example will print the contents of the file \"foo.bar\". The eof-func\r\ntion\r\n        will terminate the loop, if there is no more data left within the file.\r\n\r\n        See also\r\n\r\n        open\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        eor() ? compute the bitwise exclusive or of its two arguments\r\n\r\n        Synopsis\r\n\r\n        print eor(a,b)\r\n\r\n        Description\r\n\r\n        The eor-function takes two arguments and computes their bitwise exclusiv\r\ne or.\r\n        See your favorite introductory text on informatics for an explanation of\r\n this\r\n        function.\r\n\r\n        The xor-function is the same as the eor function; both are synonymous; h\r\nowever\r\n        they have each their own description, so you may check out the entry of \r\nxor for\r\n        a slightly different view.\r\n\r\n        Example\r\n\r\n        for a=0 to 3\r\n          for b=0 to 3\r\n            print fill$(bin$(a)),\" eor \",fill$(bin$(b)),\" = \",fill$(bin$(eor(a,b\r\n)))\r\n          next b\r\n        next a\r\n\r\n        sub fill$(a$)\r\n          return right$(\"0\"+a$,2)\r\n        end sub\r\n\r\n        This example prints a table, from which you may figure, how the eor-func\r\ntion is\r\n        computed.\r\n\r\n        See also\r\n\r\n        and, or\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        error ? raise an error and terminate your program\r\n\r\n        Synopsis\r\n\r\n        error \"Wrong, wrong, wrong !!\"\r\n\r\n        Description\r\n\r\n        Produces the same kind or error messages, that yabasic itself produces (\r\ne.g. in\r\n        case of a syntax-error). The single argument is issued along with the cu\r\nrrent\r\n        line-number.\r\n\r\n        Example\r\n\r\n        input \"Please enter a number between 1 and 10: \" a\r\n        if (a&lt;1 or a&gt;10) error \"Oh no ...\"\r\n\r\n        This program is very harsh in checking the users input; instead of just \r\nasking\r\n        again, the program terminates with an error, if the user enters somethin\r\ng\r\n        wrong.\r\n\r\n        The error message would look like this:\r\n\r\n        ---Error in t.yab, line 2: Oh no ...\r\n        ---Error: Program stopped due to an error\r\n\r\n        See also\r\n\r\n        Well, there should be a corresponding called warning; unfortunately ther\r\n is\r\n        none yet.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        euler ? another name for the constant 2.71828182864\r\n\r\n        Synopsis\r\n\r\n        foo=euler\r\n\r\n        Description\r\n\r\n        euler is the well known constant named after Leonard Euler; its value is\r\n        2.71828182864. euler is not a function, so parens are not allowed (i.e. \r\neuler()\r\n        will produce an error). Finally, you may not assign to euler; it wouldn'\r\nt sense\r\n        anyway, because it is a constant.\r\n\r\n        Example\r\n\r\n        print euler\r\n\r\n        See also\r\n\r\n        pi\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        execute$() ? execute a user defined subroutine, which must return a stri\r\nng\r\n\r\n        Synopsis\r\n\r\n        print execute$(\"foo$\",\"arg1\",\"arg2\")\r\n\r\n        Description\r\n\r\n        execute$ can be used to execute a user defined subroutine, whose name ma\r\ny be\r\n        specified as a string expression.\r\n\r\n        This feature is the only way to execute a subroutine, whose name is not \r\nknown\r\n        by the time you write your program. This might happen, if you want to ex\r\necute a\r\n        subroutine, which is compiled (using the compile command) during the cou\r\nrse of\r\n        execution of your program.\r\n\r\n        Note however, that the execute$-function is not the preferred method to \r\nexecute\r\n        a user defined subroutine; in almost all cases you should just execute a\r\n        subroutine by writing down its name within your yabasic program (see the\r\n        example).\r\n\r\n        Example\r\n\r\n        print execute$(\"foo$\",\"Hello\",\"world !\")\r\n        sub foo$(a$,b$)\r\n          return a$+\" \"+b$\r\n        end sub\r\n\r\n        The example simply prints Hello world !, which is the return value of th\r\ne user\r\n        defined subroutine foo$. The same could be achieved by executing:\r\n\r\n        print foo$(a$,b$)\r\n\r\n        See also\r\n\r\n        compile, execute\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        execute() ? execute a user defined subroutine, which must return a numbe\r\nr\r\n\r\n        Synopsis\r\n\r\n        print execute(\"bar\",\"arg1\",\"arg2\")\r\n\r\n        Description\r\n\r\n        The execute-function is the counterpart of the execute$-function (please\r\n see\r\n        there for some caveats). execute executes subroutines, which returns a n\r\number.\r\n\r\n        Example\r\n\r\n        print execute(\"bar\",2,3)\r\n        sub bar(a,b)\r\n          return a+b\r\n        end sub\r\n\r\n        See also\r\n\r\n        compile, execute$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        exit ? terminate your program\r\n\r\n        Synopsis\r\n\r\n        exit\r\n        exit 1\r\n\r\n        Description\r\n\r\n        Terminate your program and return any given value to the operating syste\r\nm. exit\r\n        is similar to end, but it will terminate your program immediately, no ma\r\ntter\r\n        what.\r\n\r\n        Example\r\n\r\n        print \"Do you want to continue ?\"\r\n        input \"Please answer y(es) or n(o): \" a$\r\n        if (lower$(left$(a$,1))=\"n\") exit 1\r\n\r\n        See also\r\n\r\n        end\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        exp() ? compute the exponential function of its single argument\r\n\r\n        Synopsis\r\n\r\n        foo=exp(bar)\r\n\r\n        Description\r\n\r\n        This function computes e to the power of its argument, where e is the we\r\nll\r\n        known euler constant 2.71828182864.\r\n\r\n        The exp-function is the inverse of the log-function.\r\n\r\n        Example\r\n\r\n        open window 100,100\r\n        for x=0 to 100\r\n           dot x,100-100*exp(x\/100)\/euler\r\n        next x\r\n\r\n        This program plots part of the exp-function, however the range is rather\r\n small,\r\n        so that you may not recognize the function from this plot.\r\n\r\n        See also\r\n\r\n        log\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        export ? mark a function as globally visible\r\n\r\n        Synopsis\r\n\r\n        export sub foo(bar)\r\n        ?\r\n        end sub\r\n\r\n        Description\r\n\r\n        The export-statement is used within libraries to mark a user defined sub\r\nroutine\r\n        as visible outside the library wherein it is defined. Subroutines, which\r\n are\r\n        not exported, must be qualified with the name of the library, e.g. foo.b\r\naz\r\n        (where foo is the name of the library and baz the name of the subroutine\r\n);\r\n        exported subroutines may be used without specifying the name of the libr\r\nary,\r\n        e.g. bar.\r\n\r\n        Therefore export may only be useful within libraries.\r\n\r\n        Example\r\n\r\n        The library foo.bar (which is listed below) defines two functions bar an\r\nd baz,\r\n        however only the function bar is exported and therefore visible even out\r\nside\r\n        the library; baz is not exported and may only be used within the library\r\n        foo.yab:\r\n\r\n        export sub bar()\r\n          print \"Hello\"\r\n        end sub\r\n\r\n        sub baz()\r\n          print \"World\"\r\n        end sub\r\n\r\n        Now within your main program cux.yab (which imports the library foo.yab)\r\n; note\r\n        that this program produces an error:\r\n\r\n        import foo\r\n\r\n        print \"Calling subroutine foo.bar (okay) ...\"\r\n        foo.bar()\r\n        print \"done.\"\r\n\r\n        print \"Calling subroutine bar (okay) ...\"\r\n        bar()\r\n        print \"done.\"\r\n\r\n        print \"Calling subroutine foo.baz (okay) ...\"\r\n        foo.baz()\r\n        print \"done.\"\r\n\r\n        print \"Calling subroutine baz (NOT okay) ...\"\r\n        baz()\r\n        print \"done.\"\r\n\r\n        The output when executing yabasic foo.yab is this:\r\n\r\n        Calling subroutine foo.bar (okay) ...\r\n        Hello\r\n        done.\r\n        Calling subroutine bar (okay) ...\r\n        Hello\r\n        done.\r\n        Calling subroutine foo.baz (okay) ...\r\n        World\r\n        done.\r\n        Calling subroutine baz (NOT okay) ...\r\n        ---Error in main.yab, line 16: can't find subroutine 'baz'\r\n        ---Dump: sub baz() called in main.yab,16\r\n        ---Error: Program stopped due to an error\r\n\r\n        As the error message above shows, the subroutine baz must be qualified w\r\nith the\r\n        name of the library, if used outside the library, wherein it is defined \r\n(e.g.\r\n        foo.baz. I.e. outside the library foo.yab you need to write foo.baz. baz\r\n alone\r\n        would be an error.\r\n\r\n        The subroutine bar (without adding the name of the library) however may \r\n(and\r\n        probably should) be used in any program, which imports the library foo.y\r\nab.\r\n\r\n        Note\r\n\r\n        In some sense the set of exported subroutines constitutes the interface \r\nof a\r\n        library.\r\n\r\n        See also\r\n\r\n        sub, import\r\n\r\n        F\r\n\r\n        false ? a constant with the value of 0\r\n        fi ? another name for endif\r\n        fill ? draw a filled circles, rectangles or triangles\r\n        floor() ? compute the floor for its (float) argument.\r\n        for ? starts a for-loop\r\n        frac() ? return the fractional part of its numeric argument\r\n\r\n        Name\r\n\r\n        false ? a constant with the value of 0\r\n\r\n        Synopsis\r\n\r\n        okay=false\r\n\r\n        Description\r\n\r\n        The constant false can be assigned to variables which later appear in\r\n        conditions (e.g. within an if-statement.\r\n\r\n        false may also be written as FALSE or even FaLsE.\r\n\r\n        Example\r\n\r\n        input \"Please enter a number between 1 and 10: \" a\r\n        if (check_input(a)) print \"Okay\"\r\n\r\n        sub check_input(x)\r\n          if (x&gt;10 or x&lt;1) return false\r\n          return true\r\n        end sub\r\n\r\n        The subroutine check_input checks its argument and returns true or false\r\n        according to the outcome of the check..\r\n\r\n        See also\r\n\r\n        true\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        fi ? another name for endif\r\n\r\n        Synopsis\r\n\r\n        if (?)\r\n        ?\r\n        fi\r\n\r\n        Description\r\n\r\n        fi marks the end of an if-statement and is exactly equivalent to endif, \r\nplease\r\n        see there for further information.\r\n\r\n        Example\r\n\r\n        input \"A number please: \" a\r\n        if (a&lt;10) then\r\n          print \"Your number is less than 10.\"\r\n        fi\r\n\r\n        See also\r\n\r\n        endif\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        fill ? draw a filled circles, rectangles or triangles\r\n\r\n        Synopsis\r\n\r\n        fill rectangle 10,10,90,90\r\n        fill circle 50,50,20\r\n        fill triangle 10,20,20,10,20,20\r\n\r\n        Description\r\n\r\n        The keyword fill may be used within the circle, rectangle or triangle co\r\nmmand\r\n        and causes these shapes to be filled.\r\n\r\n        fill can be used in conjunction with and wherever the clear-clause may a\r\nppear.\r\n        Used alone, fill will fill the interior of the shape (circle, rectangle \r\nor\r\n        triangle); together with clear the whole shape (including its interior) \r\nis\r\n        erased.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        fill circle 100,100,50\r\n        clear fill rectangle 10,10,90,90\r\n\r\n        This opens a window and draws a pacman-like figure.\r\n\r\n        See also\r\n\r\n        clear, circle, rectangle, triangle\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        floor() ? compute the floor for its (float) argument.\r\n\r\n        Synopsis\r\n\r\n        print floor(x)\r\n\r\n        Description\r\n\r\n        The floor-function returns the largest integer number, that is smaller o\r\nr equal\r\n        than its argument. For positive numbers x, floor(x) is the same as int(x\r\n); for\r\n        negaive numbers it can be different (see the example below).\r\n\r\n        Example\r\n\r\n        print int(-1.5),floor(-1.5)\r\n        print int(-1),floor(-1)\r\n        print int(1.5),floor(1.5)\r\n\r\n        This example compares the functions int and floor, starting with -1 -2, \r\nthen -1\r\n        -1 and ending with 1 1, which shows the different behaviour of both func\r\ntions.\r\n\r\n        See also\r\n\r\n        ceil, int, frac\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        for ? starts a for-loop\r\n\r\n        Synopsis\r\n\r\n        for a=1 to 100 step 2\r\n          ?\r\n        next a\r\n\r\n        Description\r\n\r\n        The for-loop lets its numerical variable (a in the synopsis) assume all \r\nvalues\r\n        within the given range. The optional step-clause may specify a value (de\r\nfault:\r\n        1) by which the variable will be incremented (or decremented, if step is\r\n        negative).\r\n\r\n        Any for-statement can be replaced by a set of ifs and gotos; as you may \r\ninfer\r\n        from the example below this is normally not feasible. However if you wan\r\nt to\r\n        know in detail how the for-statement works, you should study this exampl\r\ne,\r\n        which presents a for-statement and an exactly equivalent series of ifs a\r\nnd\r\n        gotos.\r\n\r\n        Example\r\n\r\n        for a=1 to 10 step 2:print a:next\r\n\r\n        a=1\r\n        label check\r\n        if (a&gt;10) goto done\r\n          print a\r\n          a=a+2\r\n        goto check\r\n        label done\r\n\r\n        This example simply prints the numbers 1, 3, 5, 7 and 9. It does this tw\r\nice:\r\n        First with a simple for-statement and then with ifs and gotos.\r\n\r\n        See also\r\n\r\n        step, next\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        frac() ? return the fractional part of its numeric argument\r\n\r\n        Synopsis\r\n\r\n        x=frac(y)\r\n\r\n        Description\r\n\r\n        The frac-function takes its argument, removes all the digits to the left\r\n of the\r\n        comma and just returns the digits right of the comma, i.e. the fractiona\r\nl part.\r\n\r\n        Refer to the example to learn how to rewrite frac by employing the int-f\r\nunction\r\n        (which is not suggested anyway).\r\n\r\n        Example\r\n\r\n        for a=1 to 10\r\n          print frac(sqr(a))\r\n          print sqr(a)-int(sqr(a))\r\n        next a\r\n\r\n        The example prints the fractional part of the square root of the numbers\r\n        between 1 and 10. Each result is computed (and printed) twice: Once by\r\n        employing the frac-function and once by employing the int-function.\r\n\r\n        See also\r\n\r\n        int, floor, ceil\r\n\r\n        G\r\n\r\n        getbit$() ? return a string representing the bit pattern of a rectangle \r\nwithin\r\n            the graphic window\r\n        getscreen$() ? returns a string representing a rectangular section of th\r\ne text\r\n            terminal\r\n        glob() ? check if a string matches a simple pattern\r\n        gosub ? continue execution at another point within your program (and ret\r\nurn\r\n            later)\r\n        goto ? continue execution at another point within your program (and neve\r\nr come\r\n            back)\r\n\r\n        Name\r\n\r\n        getbit$() ? return a string representing the bit pattern of a rectangle \r\nwithin\r\n        the graphic window\r\n\r\n        Synopsis\r\n\r\n        a$=getbit$(10,10,20,20)\r\n        a$=getbit$(10,10 to 20,20)\r\n\r\n        Description\r\n\r\n        The function getbit returns a string, which contains the encoded bit-pat\r\ntern of\r\n        a rectangle within graphic window; the four arguments specify two opposi\r\nte\r\n        corners of the rectangle. The string returned might later be fed to the \r\nputbit\r\n        -command.\r\n\r\n        The getbit$-function might be used for simple animations (as in the exam\r\nple\r\n        below).\r\n\r\n        Example\r\n\r\n        open window 40,40\r\n        fill circle 20,20,18\r\n        circle$=getbit$(0,0,40,40)\r\n        close window\r\n\r\n        open window 200,200\r\n        for x=1 to 200\r\n          putbit circle$,x,80\r\n        next x\r\n\r\n        This example features a circle moving from left to right over the window\r\n.\r\n\r\n        See also\r\n\r\n        putbit\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        getscreen$() ? returns a string representing a rectangular section of th\r\ne text\r\n        terminal\r\n\r\n        Synopsis\r\n\r\n        a$=getscreen$(2,2,20,20)\r\n\r\n        Description\r\n\r\n        The getscreen$ function returns a string representing the area of the sc\r\nreen as\r\n        specified by its four arguments (which specify two opposite corners). I.\r\ne.\r\n        everything you have printed within this rectangle will be encoded in the\r\n string\r\n        returned (including any colour-information).\r\n\r\n        Like most other commands dealing with advanced text output, getscreen$\r\n        requires, that you have called clear screen before.\r\n\r\n        Example\r\n\r\n        clear screen\r\n\r\n        for a=1 to 1000:\r\n                print color(\"red\") \"1\";\r\n                print color(\"green\") \"2\";\r\n                print color(\"blue\") \"3\";\r\n        next a\r\n        screen$=getscreen$(10,10,40,10)\r\n        print at(10,10) \" Please Press 'y' or 'n' ! \"\r\n        a$=inkey$\r\n        putscreen screen$,10,10\r\n\r\n        This program fills the screen with colored digits and afterwards asks th\r\ne user\r\n        for a choice ( Please press 'y' or 'n' ! ). Afterwards the area of the s\r\ncreen,\r\n        which has been overwritten by the question will be restored with its pre\r\nvious\r\n        contents, whhch had been saved via getscreen$.\r\n\r\n        See also\r\n\r\n        putscreen$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        glob() ? check if a string matches a simple pattern\r\n\r\n        Synopsis\r\n\r\n        if (glob(string$,pattern$)) ?\r\n\r\n        Description\r\n\r\n        The glob-function takes two arguments, a string and a (glob-) pattern, a\r\nnd\r\n        checks if the string matches the pattern. However glob does not employ t\r\nhe\r\n        powerful rules of regular expressions; rather it has only two special\r\n        characters: * (which matches any number (even zero) of characters) and ?\r\n (which\r\n        matches exactly a single character).\r\n\r\n        Example\r\n\r\n        for a=1 to 10\r\n          read string$,pattern$\r\n          if (glob(string$,pattern$)) then\r\n            print string$,\" matches \",pattern$\r\n          else\r\n            print string$,\" does not match \",pattern$\r\n          endif\r\n        next a\r\n\r\n        data \"abc\",\"a*\"\r\n        data \"abc\",\"a?\"\r\n        data \"abc\",\"a??\"\r\n        data \"abc\",\"*b*\"\r\n        data \"abc\",\"*\"\r\n        data \"abc\",\"???\"\r\n        data \"abc\",\"?\"\r\n        data \"abc\",\"*c\"\r\n        data \"abc\",\"A*\"\r\n        data \"abc\",\"????\"\r\n\r\n        This program checks the string abc against various patterns and prints t\r\nhe\r\n        result. The output is:\r\n\r\n        abc matches a*\r\n        abc does not match a?\r\n        abc matches a??\r\n        abc matches *b*\r\n        abc matches *\r\n        abc matches ???\r\n        abc does not match ?\r\n        abc matches *c\r\n        abc does not match A*\r\n        abc does not match ????\r\n\r\n        See also\r\n\r\n        There are no related commands.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        gosub ? continue execution at another point within your program (and ret\r\nurn\r\n        later)\r\n\r\n        Synopsis\r\n\r\n        gosub foo\r\n\r\n        ?\r\n\r\n        label foo\r\n        ?\r\n        return\r\n\r\n        Description\r\n\r\n        gosub remembers the current position within your program and then passes\r\n the\r\n        flow of execution to another point (which is normally marked with a labe\r\nl).\r\n        Later, when a return-statement is encountered, the execution is resumed \r\nat the\r\n        previous location.\r\n\r\n        gosub is the traditional command for calling code, which needs to be exe\r\ncuted\r\n        from various places within your program. However, with subroutines yabas\r\nic\r\n        offers a much more flexible way to achieve this (and more). Therefore go\r\nsub\r\n        must to be considered obsolete.\r\n\r\n        Example\r\n\r\n        print \"Do you want to exit ? \"\r\n        gosub ask\r\n        if (r$=\"y\") exit\r\n\r\n        label ask\r\n        input \"Please answer yes or no, by typing 'y' or 'n': \",r$\r\n        return\r\n\r\n        See also\r\n\r\n        return, goto, sub, label, on gosub\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        goto ? continue execution at another point within your program (and neve\r\nr come\r\n        back)\r\n\r\n        Synopsis\r\n\r\n        goto foo\r\n\r\n        ?\r\n\r\n        label foo\r\n\r\n        Description\r\n\r\n        The goto-statement passes the flow of execution to another point within \r\nyour\r\n        program (which is normally marked with a label).\r\n\r\n        goto is normally considered obsolete and harmful, however in yabasic it \r\nmay be\r\n        put to the good use of leaving loops (e.g. while or for) prematurely. No\r\nte\r\n        however, that subroutines may not be left with the goto-statement.\r\n\r\n        Example\r\n\r\n        print \"Please press any key to continue.\"\r\n        print \"(program will continue by itself within 10 seconds)\"\r\n        for a=1 to 10\r\n          if (inkey$(1)&lt;&gt;\"\") then goto done\r\n        next a\r\n        label done\r\n        print \"Hello World !\"\r\n\r\n        Here the goto-statement is used to leave the for-loop prematurely.\r\n\r\n        See also\r\n\r\n        gosub, on goto\r\n\r\n        H\r\n\r\n        hex$() ? convert a number into hexadecimal\r\n\r\n        Name\r\n\r\n        hex$() ? convert a number into hexadecimal\r\n\r\n        Synopsis\r\n\r\n        print hex$(foo)\r\n\r\n        Description\r\n\r\n        The hex$-function converts a number into a string with its hexadecimal\r\n        representation. hex$ is the inverse of the dec-function.\r\n\r\n        Example\r\n\r\n        open 1,\"foo\"\r\n        while(!eof(1))\r\n          print right$(\"0\"+hex$(peek(1)),2),\" \";\r\n          i=i+1\r\n          if (mod(i,10)=0) print\r\n        end while\r\n        print\r\n\r\n        This program reads the file foo and prints its output as a hex-dump usin\r\ng the\r\n        hex-function.\r\n\r\n        See also\r\n\r\n        decbin\r\n\r\n        I\r\n\r\n        if ? evaluate a condition and execute statements or not, depending on th\r\ne\r\n            result\r\n        import ? import a library\r\n        inkey$ ? wait, until a key is pressed\r\n        input ? read input from the user (or from a file) and assign it to a var\r\niable\r\n        instr() ? searches its second argument within the first; returns its pos\r\nition\r\n            if found\r\n        int() ? return the integer part of its single numeric argument\r\n\r\n        Name\r\n\r\n        if ? evaluate a condition and execute statements or not, depending on th\r\ne\r\n        result\r\n\r\n        Synopsis\r\n\r\n        if (?) then\r\n          ?\r\n        endif\r\n\r\n        if (?) ?\r\n\r\n        if (?) then\r\n          ?\r\n        else\r\n          ?\r\n        endif\r\n\r\n        if (?) then\r\n          ?\r\n        elsif (?)\r\n          ?\r\n        elsif (?) then\r\n          ?\r\n        else\r\n          ?\r\n        endif\r\n\r\n        Description\r\n\r\n        The if-statement is used to evaluate a conditions and take actions accor\r\ndingly.\r\n        (As an aside, please note that there is no real difference between condi\r\ntions\r\n        and expressions.)\r\n\r\n        There are two major forms of the if-statement:\r\n\r\n          * The one-line-form without the keyword then:\r\n\r\n            if (?) ?\r\n\r\n            This form evaluates the condition and if the result is true executes\r\n all\r\n            commands (separated by colons) upt to the end of the line. There is \r\nneither\r\n            an endif keyword nor an else-branch.\r\n\r\n          * The multi-line-form with the keyword then:\r\n\r\n            if (?) then ? elsif (?) ? else ? endif\r\n\r\n            (where elsif and else are optional, whereas endif is not.\r\n\r\n            According to the requirements of your program, you may specify:\r\n\r\n              + elsif(?), which specifies a condition, that will be evaluated on\r\nly if\r\n                the condition(s) within if or any preceding elsif did not match.\r\n\r\n              + else, which introduces a sequence of commands, that will be exec\r\nuted,\r\n                if none of the conditions above did match.\r\n\r\n              + endif is required and ends the if-statement.\r\n\r\n        Example\r\n\r\n        input \"Please enter a number between 1 and 4: \" a\r\n        if (a&lt;=1 or a&gt;=4) error \"Wrong, wrong !\"\r\n        if (a=1) then\r\n          print \"one\"\r\n        elsif (a=2)\r\n          print \"two\"\r\n        elsif (a=3)\r\n          print \"three\"\r\n        else\r\n          print \"four\"\r\n        endif\r\n\r\n        The input-number between 1 and 4 is simply echoed as text (one, two, ?).\r\n The\r\n        example demonstrates both forms (short and long) of the if-statement (No\r\nte\r\n        however, that the same thing can be done, probably somewhat more elegant\r\n, with\r\n        the switch-statement).\r\n\r\n        See also\r\n\r\n        else, elsif, endif, conditions and expressions.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        import ? import a library\r\n\r\n        Synopsis\r\n\r\n        import foo\r\n\r\n        Description\r\n\r\n        The import-statement imports a library. It expects a single argument, wh\r\nich\r\n        must be the name of a library (without the trailing .yab). This library \r\nwill\r\n        then be read and parsed and its subroutines (and variables) will be made\r\n        available within the importing program. Most of the time this will be th\r\ne main\r\n        program, but libraries my also import and use other libraries.\r\n\r\n        Libraries will first be searched in three locations in order:\r\n\r\n          * The current directory, i.e. the directory from which you have invoke\r\nd\r\n            yabasic)\r\n\r\n          * The directory, where your main program lives. This can be different \r\nfrom\r\n            the first directory, if you specify a path for your main program, e.\r\ng. like\r\n            yabasic foo\/bar.yab.\r\n\r\n          * Finally, libraries are searched within a special directory, whose ex\r\nact\r\n            location depends on your system or options when invoking yabasic. Ty\r\npical\r\n            values would be \/usr\/lib under Unix or C:\\yabasic\\lib under Windows.\r\n            Invoking yabasic --help will show the correct directory. The locatio\r\nn of\r\n            this directory may be changed with the option --librarypath (see opt\r\nions).\r\n\r\n        Example\r\n\r\n        Lets say you have a yabasic-program foo.yab, which imports a library lib\r\n.yab.\r\n        foo.yab; this would read:\r\n\r\n        import lib\r\n\r\n        rem  This works\r\n        lib.x(0)\r\n\r\n        rem  This works too\r\n        x(1)\r\n\r\n        rem  And this\r\n        lib.y(2)\r\n\r\n        rem  But this not !\r\n        y(3)\r\n\r\n        Now the library lib.yab reads:\r\n\r\n        rem  Make the subroutine x easily available outside this library\r\n        export sub x(a)\r\n          print a\r\n          return\r\n        end sub\r\n\r\n        rem  sub y must be referenced by its full name\r\n        rem  outside this library\r\n        sub y(a)\r\n          print a\r\n          return\r\n        end sub\r\n\r\n        This program produces an error:\r\n\r\n        0\r\n        1\r\n        2\r\n        ---Error in foo.yab, line 13: can't find subroutine 'y'\r\n        ---Dump: sub y() called in foo.yab,13\r\n        ---Error: Program stopped due to an error\r\n\r\n        As you may see from the error message, yabasic is unable to find the sub\r\nroutine\r\n        y without specifying the name of the library (i.e. lib.y). The reason fo\r\nr this\r\n        is, that y, other than x, is not exported from the library lib.yab (usin\r\ng the\r\n        export-statement).\r\n\r\n        See also\r\n\r\n        export, sub\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        inkey$ ? wait, until a key is pressed\r\n\r\n        Synopsis\r\n\r\n        clear screen\r\n        foo$=inkey$\r\n        inkey$\r\n        foo$=inkey$(bar)\r\n        inkey$(bar)\r\n\r\n        Description\r\n\r\n        The inkeys$-function waits, until the user presses a key on the keyboard\r\n or a\r\n        button of his mouse, and returns this very key. An optional argument spe\r\ncifies\r\n        the number of seconds to wait; if omitted, inkey$ will wait indefinitely\r\n.\r\n\r\n        inkey$ may only be used, if clear screen has been called at least once.\r\n\r\n        For normal keys, yabasic simply returns the key, e.g. a, 1 or !. For fun\r\nction\r\n        keys you will get f1, f2 and so on. Other special keys will return these\r\n        strings respectively: enter, backspace, del, esc, scrnup (for screen up)\r\n,\r\n        scrndown and tab. Modifier keys (e.g. ctrl, alt or shift) by themselves \r\ncan not\r\n        be detected (e.g. if you simultaneously press shift and 'a', inkey$ will\r\n return\r\n        the letter 'A' instead of 'a' of course).\r\n\r\n        If a graphical window has been opened (via open window) any mouseclick w\r\nithin\r\n        this window will be returned by inkey$ too. The string returned (e.g.\r\n        MB1d+0:0028,0061, MB2u+0:0028,0061 or MB1d+1:0028,0061) is constructed a\r\ns\r\n        follows:\r\n\r\n          * Every string associated with a mouseclick will start with the fixed \r\nstring\r\n            MB\r\n\r\n          * The next digit (1, 2 or 3) specifies the mousebutton pressed.\r\n\r\n          * A single letter, d or u, specifies, if the mousebutton has been pres\r\nsed or\r\n            released: d stands for down, i.e. the mousebutton has been pressed; \r\nu means\r\n            up, i.e. the mousebutton has been released.\r\n\r\n          * The plus-sign ('+'), which follows is always fixed.\r\n\r\n          * The next digit (in the range 0 to 7) encodes the modifier keys press\r\ned,\r\n            where 1 stands for shift, 2 stands for alt and 4 stands for ctrl.\r\n\r\n          * The next four digits (e.g. 0028) contain the x-position, where the\r\n            mousebutton has been pressed.\r\n\r\n          * The comma to follow is always fixed.\r\n\r\n          * The last four digits (e.g. 0061) contain the y-position, where the\r\n            mousebutton has been pressed.\r\n\r\n        All those fields are of fixed length, so you may use functions like mid$\r\n to\r\n        extract certain fields. However, note that with mousex, mousey, mouseb a\r\nnd\r\n        mousemod there are specialized functions to return detailed information \r\nabout\r\n        the mouseclick. Finally it should be noted, that inkey$ will only regist\r\ner\r\n        mouseclicks within the graphic-window; mouseclicks in the text-window ca\r\nnnot be\r\n        detected.\r\n\r\n        inkey$ accepts an optional argument, specifying a timeout in seconds; if\r\n no key\r\n        has been pressed within this span of time, an empty string is returned. \r\nIf the\r\n        timeout-argument is omitted, inkey$ will wait for ever.\r\n\r\n        Example\r\n\r\n        clear screen\r\n        open window 100,100\r\n        print \"Press any key or press 'q' to stop.\"\r\n        repeat\r\n          a$=inkey$\r\n          print a$\r\n        until(a$=\"q\")\r\n\r\n        This program simply returns the key pressed. You may use it, to learn, w\r\nhich\r\n        strings are returned for the special keys on your keyboard (e.g.\r\n        function-keys).\r\n\r\n        See also\r\n\r\n        clear screen,mousex, mousey, mouseb, mousemod\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        input ? read input from the user (or from a file) and assign it to a var\r\niable\r\n\r\n        Synopsis\r\n\r\n        input a\r\n        input a,b,c\r\n        input a$\r\n        input \"Hello\" a\r\n        input #1 a$\r\n\r\n        Description\r\n\r\n        input reads the new contents of one or many (numeric- or string-) variab\r\nles,\r\n        either from the keyboard (i.e. from you) or from a file. An optional fir\r\nst\r\n        string-argument specifies a prompt, which will be issued before reading \r\nany\r\n        contents.\r\n\r\n        If you want to read from an open file, you need to specify a hash ('#'),\r\n        followed by the number, under which the file has been opened.\r\n\r\n        Note, that the input is split at spaces, i.e. if you enter a whole line\r\n        consisting of many space-separated word, the first input-statement will \r\nonly\r\n        return the first word; the other words will only be returned on subseque\r\nnt\r\n        calls to input; the same applies, if a single input reads multiple varia\r\nbles:\r\n        The first variable gets only the first word, the second one the second w\r\nord,\r\n        and so on. If you don't like this behaviour, you may use line input, whi\r\nch\r\n        returns a whole line (including embedded spaces) at once.\r\n\r\n        Example\r\n\r\n        input \"Please enter the name of a file to read: \" a$\r\n        open 1,a$\r\n        while(!eof(1))\r\n          input #1 b$\r\n          print b$\r\n        wend\r\n\r\n        If this program is stored within a file test.yab and you enter this name\r\n when\r\n        prompted for a file to read, you will see this output:\r\n\r\n        Please enter the name of a file to read: t.yab\r\n        input\r\n        \"Please\r\n        enter\r\n        the\r\n        name\r\n        of\r\n        a\r\n        file\r\n        to\r\n        read:\r\n        \"\r\n        a$\r\n        open\r\n        1,a$\r\n        while(!eof(1))\r\n        input\r\n        #1\r\n        b$\r\n        print\r\n        b$\r\n        wend\r\n\r\n        See also\r\n\r\n        line input\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        instr() ? searches its second argument within the first; returns its pos\r\nition\r\n        if found\r\n\r\n        Synopsis\r\n\r\n        print instr(a$,b$)\r\n        if (instr(a$,b$)) ?\r\n        pos=instr(a$,b$,x)\r\n\r\n        Description\r\n\r\n        The instr-functions requires two string arguments and searches the secon\r\nd\r\n        argument within the first. If the second argument can be found within th\r\ne\r\n        first, the position is returned (counting from one). If it can not be fo\r\nund,\r\n        the instr-function returns 0; this makes this function usable within the\r\n        condition of an if-statement (see the example below).\r\n\r\n        If you supply a third, numeric argument to the instr-function, it will b\r\ne used\r\n        as a starting point for the search. Therefore instr(\"abcdeabcdeabcde\",\"e\r\n\",8)\r\n        will return 10, because the search for an \"e\" starts at position 8 and f\r\ninds\r\n        the \"e\" at position 10 (and not the one at position 5).\r\n\r\n        Example\r\n\r\n        input \"Please enter a text containing the string 'cat': \" a$\r\n        if (instr(a$,\"cat\")) then\r\n          print \"Well done !\"\r\n        else\r\n          print \"No cat in your input ...\"\r\n        endif\r\n\r\n        See also\r\n\r\n        rinstr\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        int() ? return the integer part of its single numeric argument\r\n\r\n        Synopsis\r\n\r\n        print int(a)\r\n\r\n        Description\r\n\r\n        The int-function returns only the digits before the comma; int(2.5) retu\r\nrns 2\r\n        and int(-2.3) returns -2.\r\n\r\n        Example\r\n\r\n        input \"Please enter a whole number between 1 and 10: \" a\r\n        if (a=int(a) and a&gt;=1 and a&lt;=10) then\r\n          print \"Thanx !\"\r\n        else\r\n          print \"Never mind ...\"\r\n        endif\r\n\r\n        See also\r\n\r\n        frac, floor, ceil\r\n\r\n        L\r\n\r\n        label ? mark a specific location within your program for goto, gosub or \r\nrestore\r\n        left$() ? return (or change) left end of a string\r\n        len() ? return the length of a string\r\n        line ? draw a line\r\n        line input ? read in a whole line of text and assign it to a variable\r\n        local ? mark a variable as local to a subroutine\r\n        log() ? compute the natural logarithm\r\n        loop ? marks the end of an infinite loop\r\n        lower$() ? convert a string to lower case\r\n        ltrim$() ? trim spaces at the left end of a string\r\n\r\n        Name\r\n\r\n        label ? mark a specific location within your program for goto, gosub or \r\nrestore\r\n\r\n        Synopsis\r\n\r\n        label foo\r\n\r\n        ?\r\n\r\n        goto foo\r\n\r\n        Description\r\n\r\n        The label-command can be used to give a name to a specific location with\r\nin your\r\n        program. Such a position might be referred from one of three commands: g\r\noto,\r\n        gosub and restore.\r\n\r\n        You may use labels safely within libraries, because a label (e.g. foo) d\r\noes not\r\n        collide with a label with the same name within the main program or withi\r\nn\r\n        another library; yabasic will not mix them up.\r\n\r\n        As an aside, please note, that line numbers are a special (however depre\r\ncated)\r\n        case of labels; see the second example below.\r\n\r\n        Example\r\n\r\n        for a=1 to 100\r\n          if (ran(10)&gt;5) goto done\r\n        next a\r\n        label done\r\n\r\n        10 for a=1 to 100\r\n        20   if (ran(10)&gt;5) goto 40\r\n        30 next a\r\n        40\r\n\r\n        Within this example, the for-loop will probably be left prematurely with\r\n a\r\n        goto-statement. This task is done twice: First with labels and then agai\r\nn with\r\n        line numbers.\r\n\r\n        See also\r\n\r\n        gosub, goto.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        left$() ? return (or change) left end of a string\r\n\r\n        Synopsis\r\n\r\n        print left$(a$,2)\r\n        left$(b$,3)=\"foobar\"\r\n\r\n        Description\r\n\r\n        The left$-function accepts two arguments (a string and a number) and ret\r\nurns\r\n        the part from the left end of the string, whose length is specified by i\r\nts\r\n        second argument. Loosely spoken, it simply returns the requested number \r\nof\r\n        chars from the left end of the given string.\r\n\r\n        Note, that the left$-function can be assigned to, i.e. it may appear on \r\nthe\r\n        left hand side of an assignment. In this way it is possible to change a \r\npart of\r\n        the variable used within the left$-function. Note, that that way the len\r\ngth of\r\n        the string cannot be changed, i.e. characters might be overwritten, but \r\nnot\r\n        added. For an example see below.\r\n\r\n        Example\r\n\r\n        input \"Please answer yes or no: \" a$\r\n        l=len(a$):a$=lower$(a$):print \"Your answer is \";\r\n        if (left$(\"yes\",l)=a$ and l&gt;=1) then\r\n          print \"yes\"\r\n        elsif (left$(\"no\",l)=a$ and l&gt;=1) then\r\n          print \"no\"\r\n        else\r\n          print \"?\"\r\n        endif\r\n\r\n        This example asks a simple yes\/no question and goes some way to accept e\r\nven\r\n        incomplete input, while still being able to reject invalid input.\r\n\r\n        This second example demonstrates the capability to assign to the\r\n        left$-function.\r\n\r\n        a$=\"Heiho World !\"\r\n        print a$\r\n        left$(a$,5)=\"Hello\"\r\n        print a$\r\n\r\n        See also\r\n\r\n        right$, mid$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        len() ? return the length of a string\r\n\r\n        Synopsis\r\n\r\n        x=len(a$)\r\n\r\n        Description\r\n\r\n        The len-function returns the length of its single string argument.\r\n\r\n        Example\r\n\r\n        input \"Please enter a password: \" a$\r\n        if (len(a$)&lt;6) error \"Password too short !\"\r\n\r\n        This example checks the length of the password, that the user has entere\r\nd.\r\n\r\n        See also\r\n\r\n        left$, right$ and mid$,\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        line ? draw a line\r\n\r\n        Synopsis\r\n\r\n        open window 100,100\r\n        line 0,0,100,100\r\n        line 0,0 to 100,100\r\n        new curve\r\n        line 100,100\r\n        line to 100,100\r\n\r\n        open window 100,100\r\n        clear line 0,0,100,100\r\n        clear line 0,0 to 100,100\r\n        new curve\r\n        clear line 100,100\r\n        clear line to 100,100\r\n\r\n        Description\r\n\r\n        The line-command draws a line. Simple as this is, the line-command has a\r\n large\r\n        variety of forms as they are listed in the synopsis above. Lets look at \r\nthem a\r\n        little closer:\r\n\r\n          * A line has a starting and an end point; therefore the line-command\r\n            (normally) needs four numbers as arguments, representing these two p\r\noints.\r\n            This is the first form appearing within the synopsis.\r\n\r\n          * You may separate the two points with either ',' or to, which account\r\ns for\r\n            the second form of the line-command.\r\n\r\n          * The line-command may be used to draw a connected sequence of lines w\r\nith a\r\n            sequence of commands like line x,y; Each command will draw a line fr\r\nom the\r\n            point where the last line-command left off, to the point specified i\r\nn the\r\n            arguments. Note, that you need to use the command new curve before y\r\nou may\r\n            issue such a line-command. See the example below.\r\n\r\n          * You may insert the word to for beauty: line to x,y, which does exact\r\nly the\r\n            same as line x,y\r\n\r\n          * Finally, you may choose not to draw, but to erase the lines; this ca\r\nn be\r\n            done by prepending the phrase clear. This account for all the other \r\nforms\r\n            of the line-command.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        line 10,10 to 10,190\r\n        line 10,190 to 190,190\r\n        new curve\r\n        for a=0 to 360\r\n          line to 10+a*180\/360,100+60*sin(a*pi\/180)\r\n        next a\r\n\r\n        This example draws a sine-curve (with an offset in x- and y-direction). \r\nNote,\r\n        that the first line-command after new curve does not draw anything. Only\r\n the\r\n        coordinates will be stored. The second iteration of the loop then uses t\r\nhese\r\n        coordinates as a starting point for the first line.\r\n\r\n        See also\r\n\r\n        new curve, close curve, open window\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        line input ? read in a whole line of text and assign it to a variable\r\n\r\n        Synopsis\r\n\r\n        line input a\r\n        line input a$\r\n        line input \"Hello\" a\r\n        line input #1 a$\r\n\r\n        Description\r\n\r\n        In most respects line input is like the input-command: It reads the new\r\n        contents of a variable, either from keyboard or from a file. However, li\r\nne\r\n        input always reads a complete line and assigns it to its variable. line \r\ninput\r\n        does not stop reading at spaces and is therefore the best way to read in\r\n a\r\n        string which might contain whitespace. Note, that the final newline is s\r\ntripped\r\n        of.\r\n\r\n        Example\r\n\r\n        line input \"Please enter your name (e.g. Frodo Beutelin): \" a$\r\n        print \"Hello \",a$\r\n\r\n        Note that the usage of line input is essential in this example; a simple\r\n        input-statement would only return the string up to the first space, e.g.\r\n Frodo.\r\n\r\n        See also\r\n\r\n        input\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        local ? mark a variable as local to a subroutine\r\n\r\n        Synopsis\r\n\r\n        sub foo()\r\n\r\n          local a,b,c$,d(10),e$(5,5)\r\n\r\n          ?\r\n\r\n        end sub\r\n\r\n        Description\r\n\r\n        The local-command can (and should be) used to mark a variable (or array)\r\n as\r\n        local to the containing subroutine. This means, that a local variable in\r\n your\r\n        subroutine is totally different from a variable with the same name withi\r\nn your\r\n        main program. Variables which are known everywhere within your program a\r\nre\r\n        called global in contrast.\r\n\r\n        Declaring variables within the subroutine as local helps to avoid hard t\r\no find\r\n        bugs; therefore local variables should be used whenever possible.\r\n\r\n        Note, that the parameters of your subroutines are always local.\r\n\r\n        As you may see from the example, local arrays may be created without usi\r\nng the\r\n        keyword dim (which is required only for global arrays).\r\n\r\n        Example\r\n\r\n        a=1\r\n        b=1\r\n        print a,b\r\n        foo()\r\n        print a,b\r\n\r\n        sub foo()\r\n          local a\r\n          a=2\r\n          b=2\r\n        end sub\r\n\r\n        This example demonstrates the difference between local and global variab\r\nles; it\r\n        produces this output:\r\n\r\n        1 1\r\n        1 2\r\n\r\n        As you may see, the content of the global variable a is unchanged after \r\nthe\r\n        subroutine foo; this is because the assignment a=2 within the subroutine\r\n        affects the local variable a only and not the global one. However, the v\r\nariable\r\n        b is never declared local and therefore the subroutine changes the globa\r\nl\r\n        variable, which is reflected in the output of the second print-statement\r\n.\r\n\r\n        See also\r\n\r\n        sub, static, dim\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        log() ? compute the natural logarithm\r\n\r\n        Synopsis\r\n\r\n        a=log(x)\r\n        a=log(x,base)\r\n\r\n        Description\r\n\r\n        The log-function computes the logarithm of its first argument. The optio\r\nnal\r\n        second argument gives the base for the logarithm; if this second argumen\r\nt is\r\n        omitted, the euler-constant 2.71828? will be taken as the base.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        for x=10 to 190 step 10:for y=10 to 190 step 10\r\n          r=3*log(1+x,1+y)\r\n          if (r&gt;10) r=10\r\n          if (r&lt;1) r=1\r\n          fill circle x,y,r\r\n        next y:next x\r\n\r\n        This draws another nice plot.\r\n\r\n        See also\r\n\r\n        exp\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        loop ? marks the end of an infinite loop\r\n\r\n        Synopsis\r\n\r\n        do\r\n          ?\r\n        loop\r\n\r\n        Description\r\n\r\n        The loop-command marks the ends of a loop (which is started by do), wher\r\nein all\r\n        statements within the loop are repeated forever. In this respect the do\r\n        loop-loop is infinite, however, you may leave it anytime via break or go\r\nto.\r\n\r\n        Example\r\n\r\n        print \"Hello, I will throw dice, until I get a 2 ...\"\r\n        do\r\n          r=int(ran(6))+1\r\n          print r\r\n          if (r=2) break\r\n        loop\r\n\r\n        See also\r\n\r\n        do, for, repeat, while, break\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        lower$() ? convert a string to lower case\r\n\r\n        Synopsis\r\n\r\n        l$=lower$(a$)\r\n\r\n        Description\r\n\r\n        The lower$-function accepts a single string-argument and converts it to \r\nall\r\n        lower case.\r\n\r\n        Example\r\n\r\n        input \"Please enter a password: \" a$\r\n        if (a$=lower$(a$)) error \"Your password is NOT mixed case !\"\r\n\r\n        This example prompts for a password and checks, if it is really lower ca\r\nse.\r\n\r\n        See also\r\n\r\n        upper$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        ltrim$() ? trim spaces at the left end of a string\r\n\r\n        Synopsis\r\n\r\n        a$=ltrim$(b$)\r\n\r\n        Description\r\n\r\n        The ltrim$-function removes all whitespace from the left end of a string\r\n and\r\n        returns the result.\r\n\r\n        Example\r\n\r\n        input \"Please answer 'yes' or 'no' : \" a$\r\n        a$=lower$(ltrim$(rtrim$(a$)))\r\n        if (len(a$)&gt;0 and a$=left$(\"yes\",len(a$))) then\r\n          print \"Yes ...\"\r\n        else\r\n          print \"No ...\"\r\n        endif\r\n\r\n        This example prompts for an answer and removes any spaces, which might p\r\nrecede\r\n        the input; therefore it is even prepared for the (albeit somewhat pathol\r\nogical\r\n        case, that the user first hits space before entering his answer.\r\n\r\n        See also\r\n\r\n        rtrim$, trim$\r\n\r\n        M\r\n\r\n        max() ? return the larger of its two arguments\r\n        mid$() ? return (or change) characters from within a string\r\n        min() ? return the smaller of its two arguments\r\n        mod ? compute the remainder of a division\r\n        mouseb ? extract the state of the mousebuttons from a string returned by\r\n inkey$\r\n        mousemod ? return the state of the modifier keys during a mouseclick\r\n        mousex ? return the x-position of a mouseclick\r\n        mousey ? return the y-position of a mouseclick\r\n\r\n        Name\r\n\r\n        max() ? return the larger of its two arguments\r\n\r\n        Synopsis\r\n\r\n        print max(a,b)\r\n\r\n        Description\r\n\r\n        Return the maximum of its two arguments.\r\n\r\n        Example\r\n\r\n        dim m(10)\r\n        for a=1 to 1000\r\n          m=0\r\n          For b=1 to 10\r\n            m=max(m,ran(10))\r\n          next b\r\n          m(m)=m(m)+1\r\n        next a\r\n\r\n        for a=1 to 9\r\n          print a,\": \",m(a)\r\n        next a\r\n\r\n        Within the inner for-loop (the one with the loop-variable b), the exampl\r\ne\r\n        computes the maximum of 10 random numbers. The outer loop (with the loop\r\n        variable a) now repeats this process 1000 times and counts, how often ea\r\nch\r\n        maximum appears. The last loop finally reports the result.\r\n\r\n        Now, the interesting question would be, which will be approached, when w\r\ne\r\n        increase the number of iterations from thousand to infinity. Well, maybe\r\n        someone could just tell me :-)\r\n\r\n        See also\r\n\r\n        min\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        mid$() ? return (or change) characters from within a string\r\n\r\n        Synopsis\r\n\r\n        print mid$(a$,2,1)\r\n        print mid$(a$,2)\r\n        mid$(a$,5,3)=\"foo\"\r\n        mid$(a$,5)=\"foo\"\r\n\r\n        Description\r\n\r\n        The mid$-function requires three arguments: a string and two numbers, wh\r\nere the\r\n        first number specifies a position within the string and the second one g\r\nives\r\n        the number of characters to be returned; if you omit the second argument\r\n, the\r\n        mid$-function returns all characters up to the end of the string.\r\n\r\n        Note, that you may assign to the mid$-function, i.e. mid$ may appear on \r\nthe\r\n        left hand side of an assignment. In this way it is possible to change a \r\npart of\r\n        the variable used within the mid$-function. Note, that that way the leng\r\nth of\r\n        the string cannot be changed, i.e. characters might be overwritten, but \r\nnot\r\n        added. For an example see below.\r\n\r\n        Example\r\n\r\n        input \"Please enter a string: \" a$\r\n        for a=1 to len(a$)\r\n          if (instr(\"aeiou\",lower$(mid$(a$,a,1)))) mid$(a$,a,1)=\"e\"\r\n        next a\r\n        print \"When you turn everything to lower case and\"\r\n        print \"replace every vowel with 'e', your input reads:\"\r\n        print\r\n        print a$\r\n\r\n        This example transforms the input string a bit, using the mid$-function \r\nto\r\n        retrieve a character from within the string as well as to change it.\r\n\r\n        See also\r\n\r\n        left$ and right$.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        min() ? return the smaller of its two arguments\r\n\r\n        Synopsis\r\n\r\n        print min(a,b)\r\n\r\n        Description\r\n\r\n        Return the minimum of its two argument.\r\n\r\n        Example\r\n\r\n        dim m(10)\r\n        for a=1 to 1000\r\n          m=min(ran(10),ran(10))\r\n          m(m)=m(m)+1\r\n        next a\r\n\r\n        for a=1 to 9\r\n          print a,\": \",m(a)\r\n        next a\r\n\r\n        For each iteration of the loop, the lower of two random number is record\r\ned. The\r\n        result is printed at the end.\r\n\r\n        See also\r\n\r\n        max\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        mod ? compute the remainder of a division\r\n\r\n        Synopsis\r\n\r\n        print mod(a,b)\r\n\r\n        Description\r\n\r\n        The mod-function divides its two arguments and computes the remainder. N\r\note,\r\n        that a\/b-int(a\/b) and mod(a,b) are always equal.\r\n\r\n        Example\r\n\r\n        clear screen\r\n        print at(10,10) \"Please wait \";\r\n        p$=\"-\\|\/\"\r\n        for a=1 to 100\r\n          rem  ... do something lengthy here, or simply sleep :-)\r\n          pause(1)\r\n          print at(22,10) mid$(p$,1+mod(a,4))\r\n        next a\r\n\r\n        This example executes some time consuming action within a loop (in fact,\r\n it\r\n        simply sleeps) and gives the user some indication of progress by display\r\ning a\r\n        turning bar (that's where the mod-function comes into play).\r\n\r\n        See also\r\n\r\n        int, frac\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        mouseb ? extract the state of the mousebuttons from a string returned by\r\n inkey$\r\n\r\n        Synopsis\r\n\r\n        inkey$\r\n        print mouseb()\r\n        print mouseb\r\n        a$=inkey$\r\n        print mouseb(a$)\r\n\r\n        Description\r\n\r\n        The mouseb-function is a helper function for decoding part of the (rathe\r\nr\r\n        complicated) strings, which are returned by the inkey$-function. If a\r\n        mousebutton has been pressed, the mouseb-function returns the number (1,\r\n2 or 3)\r\n        of the mousebutton, when it is pressed and returns its negative (-1,-2 o\r\nr -3),\r\n        when it is released.\r\n\r\n        The mouseb-function accepts zero or one arguments. A single argument sho\r\nuld be\r\n        a string returned by the inkey$-function; if mouseb is called without an\r\ny\r\n        arguments, it returns the values from the last call to inkey$, which are\r\n stored\r\n        implicitly and internally by yabasic.\r\n\r\n        Note\r\n\r\n        Note however, that the value returned by the mouseb-function does not re\r\nflect\r\n        the current state of the mousebuttons. It rather extracts the informatio\r\nn from\r\n        the string passed as an argument (or from the last call to the inkey$-fu\r\nnction,\r\n        if no argument is passed). So the value returned by mouseb reflects the \r\nstate\r\n        of the mousebuttons at the time the inkey$-function has been called; as \r\nopposed\r\n        to the time the mouseb-function is called.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        clear screen\r\n        print \"Please draw lines; press (and keep it pressed)\"\r\n        print \"the left mousebutton for the starting point,\"\r\n        print \"release it for the end-point.\"\r\n        do\r\n          if (mouseb(release$)=1) press$=release$\r\n          release$=inkey$\r\n          if (mouseb(release$)=-1) then\r\n            line mousex(press$),mousey(press$) to mousex(release$),mousey(releas\r\ne$)\r\n          endif\r\n        loop\r\n\r\n        This is a maybe the most simplistic line-drawing program possible, catch\r\ning\r\n        presses as well as releases of the first mousebutton.\r\n\r\n        See also\r\n\r\n        inkey$, mousex, mousey and mousemod\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        mousemod ? return the state of the modifier keys during a mouseclick\r\n\r\n        Synopsis\r\n\r\n        inkey$\r\n        print mousemod()\r\n        print mousemod\r\n        a$=inkey$\r\n        print mousemod(a$)\r\n\r\n        Description\r\n\r\n        The mousemod-function is a helper function for decoding part of the (rat\r\nher\r\n        complicated) strings, which are returned by the inkey$-function if a\r\n        mousebutton has been pressed. It returns the state of the keyboard modif\r\niers\r\n        (shift, ctrl or alt): If the shift-key is pressed, mousemod returns 1, f\r\nor the\r\n        alt-key 2 and for the ctrl-key 4. If more than one key is pressed, the s\r\num of\r\n        these values is returned, e.g. mousemod returns 5, if shift and ctrl are\r\n        pressed simultaneously.\r\n\r\n        The mousemod-function accepts zero or one arguments. A single argument s\r\nhould\r\n        be a string returned by the inkey$-function; if mousemod is called witho\r\nut any\r\n        arguments, it returns the values from the last call to inkey$ (which are\r\n stored\r\n        implicitly and internally by yabasic).\r\n\r\n        Note\r\n\r\n        Please see also the Note within the mouseb-function.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        clear screen\r\n        do\r\n          a$=inkey$\r\n          if (left$(a$,2)=\"MB\") then\r\n            x=mousex(a$)\r\n            y=mousey(a$)\r\n            if (mousemod(a$)=0) then\r\n              circle x,y,20\r\n            else\r\n              fill circle x,y,20\r\n            endif\r\n          endif\r\n        loop\r\n\r\n        This program draws a circle, whenever a mousebutton is pressed; the circ\r\nles are\r\n        filled, when any modifier is pressed, and empty if not.\r\n\r\n        See also\r\n\r\n        inkey$, mousex, mousey and mouseb\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        mousex ? return the x-position of a mouseclick\r\n\r\n        Synopsis\r\n\r\n        inkey$\r\n        print mousex()\r\n        print mousex\r\n        a$=inkey$\r\n        print mousex(a$)\r\n\r\n        Description\r\n\r\n        The mousex-function is a helper function for decoding part of the (rathe\r\nr\r\n        complicated) strings, which are returned by the inkey$-function; It retu\r\nrns the\r\n        x-position of the mouse as encoded within its argument.\r\n\r\n        The mousex-function accepts zero or one arguments. A single argument sho\r\nuld be\r\n        a string returned by the inkey$-function; if mousex is called without an\r\ny\r\n        arguments, it returns the values from the last call to inkey$ (which are\r\n stored\r\n        implicitly and internally by yabasic).\r\n\r\n        Note\r\n\r\n        Please see also the Note within the mouseb-function.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        clear screen\r\n        do\r\n          a$=inkey$\r\n          if (left$(a$,2)=\"MB\") then\r\n            line mousex,0 to mousex,200\r\n          endif\r\n        loop\r\n\r\n        This example draws vertical lines at the position, where the mousebutton\r\n has\r\n        been pressed.\r\n\r\n        See also\r\n\r\n        inkey$, mousemod, mousey and mouseb\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        mousey ? return the y-position of a mouseclick\r\n\r\n        Synopsis\r\n\r\n        inkey$\r\n        print mousey()\r\n        print mousey\r\n        a$=inkey$\r\n        print mousey(a$)\r\n\r\n        Description\r\n\r\n        The mousey-function is a helper function for decoding part of the (rathe\r\nr\r\n        complicated) strings, which are returned by the inkey$-function. mousey \r\nreturns\r\n        the y-position of the mouse as encoded within its argument.\r\n\r\n        The mousey-function accepts zero or one arguments. A single argument sho\r\nuld be\r\n        a string returned by the inkey$-function; if mousey is called without an\r\ny\r\n        arguments, it returns the values from the last call to inkey$ (which are\r\n stored\r\n        implicitly and internally by yabasic).\r\n\r\n        Note\r\n\r\n        Please see also the Note within the mouseb-function.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        clear screen\r\n        do\r\n          a$=inkey$\r\n          if (left$(a$,2)=\"MB\") then\r\n            line 0,mousey to 200,mousey\r\n          endif\r\n        loop\r\n\r\n        This example draws horizontal lines at the position, where the mousebutt\r\non has\r\n        been pressed.\r\n\r\n        See also\r\n\r\n        inkey$, mousemod, mousex and mouseb\r\n\r\n        N\r\n\r\n        new curve ? start a new curve, that will be drawn with the line-command\r\n        next ? mark the end of a for loop\r\n        not ? negate an expression; can be written as !\r\n        numparams ? return the number of parameters, that have been passed to a\r\n            subroutine\r\n\r\n        Name\r\n\r\n        new curve ? start a new curve, that will be drawn with the line-command\r\n\r\n        Synopsis\r\n\r\n        new curve\r\n        line to x,y\r\n\r\n        Description\r\n\r\n        The new curve-function starts a new sequence of lines, that will be draw\r\nn by\r\n        repeated line to-commands.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        ellipse(100,50,30,60)\r\n        ellipse(150,100,60,30)\r\n        sub ellipse(x,y,xr,yr)\r\n          new curve\r\n          for a=0 to 2*pi step 0.2\r\n            line to x+xr*cos(a),y+yr*sin(a)\r\n          next a\r\n          close curve\r\n        end sub\r\n\r\n        This example defines a subroutine ellipse that draws an ellipse. Within \r\nthis\r\n        subroutine, the ellipse is drawn as a sequence of lines started with the\r\n new\r\n        curve command and closed with close curve.\r\n\r\n        See also\r\n\r\n        line, close curve\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        next ? mark the end of a for loop\r\n\r\n        Synopsis\r\n\r\n        for a=1 to 10\r\n        next a\r\n\r\n        Description\r\n\r\n        The next-keyword marks the end of a for-loop. All statements up to the\r\n        next-keyword will be repeated as specified with the for-clause. Note, th\r\nat the\r\n        name of the variable is optional; so instead of next a you may write nex\r\nt.\r\n\r\n        Example\r\n\r\n        for a=1 to 300000\r\n          for b=1 to 21+20*sin(pi*a\/20)\r\n            print \"*\";\r\n          next b\r\n          print\r\n          sleep 0.1\r\n        next a\r\n\r\n        This example simply plots a sine-curve until you fall asleep.\r\n\r\n        See also\r\n\r\n        for\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        not ? negate an expression; can be written as !\r\n\r\n        Synopsis\r\n\r\n        if (not a&lt;b) then ?\r\n        bad=!okay\r\n\r\n        Description\r\n\r\n        The keyword not (or ! for short) is mostly used within conditions (e.g. \r\nwithin\r\n        if- or while-statements). There it is employed to negate the condition o\r\nr\r\n        expression (i.e. turn TRUE into FALSE and vice versa)\r\n\r\n        However not can be used within arithmetic calculations too., simply beca\r\nuse\r\n        there is no difference between arithmetic and logical expressions.\r\n\r\n        Example\r\n\r\n        input \"Please enter three ascending numbers: \" a,b,c\r\n        if (not (a&lt;b and b&lt;c)) error \" the numbers you have entered are not asce\r\nnding ...\"\r\n\r\n        See also\r\n\r\n        and,or\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        numparams ? return the number of parameters, that have been passed to a\r\n        subroutine\r\n\r\n        Synopsis\r\n\r\n        sub foo(a,b,c)\r\n          if (numparams=1) ?\r\n          ?\r\n        end sub\r\n\r\n        Description\r\n\r\n        Within a subroutine the local variable numparam or numparams contains th\r\ne\r\n        number of parameters, that have been passed to the subroutine. This info\r\nrmation\r\n        can be useful, because the subroutine may have been called with fewer\r\n        parameters than actually declared. The number of values that actually ha\r\nve been\r\n        passed while calling the subroutine, can be found in numparams.\r\n\r\n        Note, that arguments which are used in the definition of a subroutine bu\r\nt are\r\n        left out during a call to it (thereby reducing the value of numparams) r\r\neceive\r\n        a value of 0 or \"\" (empty string) respectively.\r\n\r\n        Example\r\n\r\n        a$=\"123456789\"\r\n        print part$(a$,4)\r\n        print part$(a$,3,7)\r\n\r\n        sub part$(a$,f,t)\r\n          if (numparams=2) then\r\n            return mid$(a$,f)\r\n          else\r\n            return mid$(a$,f,t-f+1)\r\n          end if\r\n        end sub\r\n\r\n        When you run this example, it will print 456789 and 34567. Take a look a\r\nt the\r\n        subroutine part$, which returns part of the string which has been passed\r\n as an\r\n        argument. If (besides the string) two numbers are passed, they define th\r\ne\r\n        starting and end position of the substring, that will be returned. Howev\r\ner, if\r\n        only one number is passed, the rest of the string, starting from this po\r\nsition\r\n        will be returned. Each of these cases is recognized with the help of the\r\n        numparams variable.\r\n\r\n        See also\r\n\r\n        sub\r\n\r\n        O\r\n\r\n        on gosub ? jump to one of multiple gosub-targets\r\n        on goto ? jump to one of many goto-targets\r\n        on interrupt ? change reaction on keyboard interrupts\r\n        open ? open a file\r\n        open printer ? open printer for printing graphics\r\n        open window ? open a graphic window\r\n        logical or ? logical or, used in conditions\r\n        or() ? arithmetic or, used for bit-operations\r\n\r\n        Name\r\n\r\n        on goto ? jump to one of multiple gosub-targets\r\n\r\n        Synopsis\r\n\r\n        on a gosub foo,bar,baz\r\n          ?\r\n        label foo\r\n          ?\r\n        return\r\n\r\n        label bar\r\n          ?\r\n        return\r\n\r\n        label baz\r\n          ?\r\n        return\r\n\r\n        Description\r\n\r\n        The on gosub statement uses its numeric argument (the one between on and\r\n gosub)\r\n        to select an element from the list of labels, which follows after the\r\n        gosub-keyword: If the number is 1, the program does a gosub to the first\r\n label;\r\n        if the number is 2, to the second and, so on. if the number is zero or l\r\ness,\r\n        the program continues at the position of the first label; if the number \r\nis\r\n        larger than the total count of labels, the execution continues at the po\r\nsition\r\n        of the last label; i.e. the first and last label in the list constitute \r\nsome\r\n        kind of fallback-slot.\r\n\r\n        Note, that the on gosub-command can no longer be considered state of the\r\n art;\r\n        people (not me !) may even start to mock you, if you use it.\r\n\r\n        Example\r\n\r\n        do\r\n          print \"Please enter a number between 1 and 3: \"\r\n          print\r\n          input \"Your choice \" a\r\n          on a gosub bad,one,two,three,bad\r\n        loop\r\n\r\n        label bad\r\n          print \"No. Please between 1 and 3\"\r\n        return\r\n\r\n        label one\r\n          print \"one\"\r\n        return\r\n\r\n        label two\r\n          print \"two\"\r\n        return\r\n\r\n        label three\r\n          print \"three\"\r\n        return\r\n\r\n        Note, how invalid input (a number less than 1, or larger than 3) is\r\n        automatically detected.\r\n\r\n        See also\r\n\r\n        goto, on gosub\/function&gt;\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        on goto ? jump to one of many goto-targets\r\n\r\n        Synopsis\r\n\r\n        on a goto foo,bar,baz\r\n          ?\r\n        label foo\r\n          ?\r\n        label bar\r\n          ?\r\n        label baz\r\n          ?\r\n\r\n        Description\r\n\r\n        The on goto statement uses its numeric argument (the one between on and \r\ngoto to\r\n        select an element from the list of labels, which follows after the\r\n        goto-keyword: If the number is 1, the execution continues at the first l\r\nabel;\r\n        if the number is 2, at the second, and so on. if the number is zero or l\r\ness,\r\n        the program continues at the position of the first label; if the number \r\nis\r\n        larger than the total count of labels, the execution continues at the po\r\nsition\r\n        of the last label; i.e. the first and last label in the list constitute \r\nsome\r\n        kind of fallback-slot.\r\n\r\n        Note, that (unlike the goto-command) the on goto-command can no longer b\r\ne\r\n        considered state of the art; people may (not me !) even start to mock yo\r\nu, if\r\n        you use it.\r\n\r\n        Example\r\n\r\n        label over\r\n        print \"Please Select one of these choices: \"\r\n        print\r\n        print \"  1 -- show time\"\r\n        print \"  2 -- show date\"\r\n        print \"  3 -- exit\"\r\n        print\r\n        input \"Your choice \" a\r\n        on a goto over,show_time,show_date,terminate,over\r\n\r\n        label show_time\r\n          print time$()\r\n        goto over\r\n\r\n        label show_date\r\n          print date$()\r\n        goto over\r\n\r\n        label terminate\r\n        exit\r\n\r\n        Note, how invalid input (a number less than 1, or larger than 3) is\r\n        automatically detected; in such a case the question is simply issued aga\r\nin.\r\n\r\n        See also\r\n\r\n        goto, on gosub\/function&gt;\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        on interrupt ? change reaction on keyboard interrupts\r\n\r\n        Synopsis\r\n\r\n        on interrupt break\r\n        ?\r\n        on interrupt continue\r\n\r\n        Description\r\n\r\n        With the on interrupt-command you may change the way, how yabasic reacts\r\n on a\r\n        keyboard interrupt; it comes in two variants: on interrupt break and on\r\n        interrupt continue. A keyboard interrupt is produced, if you press ctrl-\r\nC on\r\n        your keyboard; normally (and certainly after you have called on interrup\r\nt\r\n        break), yabasic will terminate with an error message. However after the \r\ncommand\r\n        on interrupt continue yabasic ignores any keyboard interrupt. This may b\r\ne\r\n        useful, if you do not want your program being interruptible during certa\r\nin\r\n        critical operations (e.g. updating of files).\r\n\r\n        Example\r\n\r\n        print \"Please stand by while writing a file with random data ...\"\r\n        on interrupt continue\r\n        open \"random.data\" for writing as #1\r\n        for a=1 to 100\r\n          print #1 ran(100)\r\n          print a,\" percent done.\"\r\n          sleep 1\r\n        next a\r\n        close #1\r\n        on interrupt continue\r\n\r\n        This program writes a file with 100 random numbers. The on interrupt con\r\ntinue\r\n        command insures, that the program will not be terminated on a keyboard\r\n        interrupt and the file will be written entirely in any case. The sleep-c\r\nommand\r\n        just stretches the process artificially to give you a chance to try a ct\r\nrl-C.\r\n\r\n        See also\r\n\r\n        There is no related command.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        open ? open a file\r\n\r\n        Synopsis\r\n\r\n        open a,\"file\",\"r\"\r\n        open #a,\"file\",\"w\"\r\n        open #a,printer\r\n        open \"file\" for reading as a\r\n        open \"file\" for writing as #a\r\n        a=open(\"file\")\r\n        a=open(\"file\",\"r\")\r\n        if (open(a,\"file\")) ?\r\n        if (open(a,\"file\",\"w\")) ?\r\n\r\n        Description\r\n\r\n        The open-command opens a file for reading or writing or a printer for pr\r\ninting\r\n        text. open comes in a wide variety of ways; it requires these arguments:\r\n\r\n        filenumber\r\n\r\n            In the synopsis this is a or #a. In yabasic each file is associated \r\nwith a\r\n            number between 1 and a maximum value, which depends on the operating\r\n            system. For historical reasons the filenumber can be preceded by a h\r\nash ('#\r\n            '). Note, that specifying a filenumber is optional; if it is omitted\r\n, the\r\n            open-function will return a filenumber, which should then be stored \r\nin a\r\n            variable for later reference. This filenumber can be a simple number\r\n or an\r\n            arbitrary complex arithmetic expression, in which case braces might \r\nbe\r\n            necessary to save yabasic from getting confused.\r\n\r\n        filename\r\n\r\n            In the synopsis above this is \"file\". This string specifies the name\r\n of the\r\n            file to open (note the important caveat on specifying these filename\r\ns).\r\n\r\n        accessmode\r\n\r\n            In the synopsis this is \"r\", \"w\", for reading or for writing. This s\r\ntring\r\n            or clause specifies the mode in which the file is opened; it may be \r\none of:\r\n\r\n            \"r\"\r\n\r\n                Open the file for reading (may also be written as for reading). \r\nIf the\r\n                file does not exist, the command will fail. This mode is the def\r\nault,\r\n                i.e. if no mode is specified with the open-command, the file wil\r\nl be\r\n                opened with this mode.\r\n\r\n            \"w\"\r\n\r\n                Open the file for writing (may also be written as for writing). \r\nIf the\r\n                file does not exist, it will be created.\r\n\r\n            \"a\"\r\n\r\n                Open the file for appending, i.e. what you write to the file wil\r\nl be\r\n                appended after its initial contents. If the file does not exist,\r\n it\r\n                will be created.\r\n\r\n            \"b\"\r\n\r\n                This letter may not appear alone, but may be combined with the o\r\nther\r\n                letters (e.g. \"rb\") to open a file in binary mode (as opposed to\r\n text\r\n                mode).\r\n\r\n        As you may see from the synopsis, the open-command may either be called \r\nas a\r\n        command (without braces) or as a function (with braces). If called as a\r\n        function, it will return the filenumber or zero if the operation fails.\r\n        Therefore the open-function may be used within the condition of an\r\n        if-statement.\r\n\r\n        If the open-command fails, you may use peek(\"error\") to retrieve the exa\r\nct\r\n        nature of the error.\r\n\r\n        Furthermore note, that there is another, somewhat separate usage of the\r\n        open-command; if you specify the bareword printer instead of a filename,\r\n the\r\n        command opens a printer for printing text. Every text (and only text) yo\r\nu print\r\n        to this file will appear on your printer. Note, that this is very differ\r\nent\r\n        from printing graphics, as can be done with open printer.\r\n\r\n        Example\r\n\r\n        open \"foo.bar\" for writing as #1\r\n        print #1 \"Hallo !\"\r\n        close #1\r\n        if (not open(1,\"foo.bar\")) error \"Could not open 'foo.bar' for reading\"\r\n        while(not eof(1))\r\n          line input #1 a$\r\n          print a$\r\n        wend\r\n\r\n        This example simply opens the file foo.bar, writes a single line, reopen\r\ns it\r\n        and reads its contents again.\r\n\r\n        See also\r\n\r\n        close, print, peek, peek(\"error\") and open printer\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        open printer ? open printer for printing graphics\r\n\r\n        Synopsis\r\n\r\n        open printer\r\n        open printer \"file\"\r\n\r\n        Description\r\n\r\n        The open printer-command opens a printer for printing graphics. The comm\r\nand\r\n        requires, that a graphic window has been opened before. Everything that \r\nis\r\n        drawn into this window will then be sent to the printer too.\r\n\r\n        A new piece of paper may be started with the clear window-command; the f\r\ninal\r\n        (or only) page will appear after the close printer-command.\r\n\r\n        Note, that you may specify a filename with open printer; in that case th\r\ne\r\n        printout will be sent to a filename instead to a printer. Your program o\r\nr the\r\n        user will be responsible for sending this file to the printer afterwards\r\n.\r\n\r\n        If you use yabasic under Unix, you will need a postscript printer (becau\r\nse\r\n        yabasic produces postscript output). Alternatively you may use ghostscri\r\npt to\r\n        transform the postscript file into a form suitable for your printer; but\r\n that\r\n        is beyond the responsibility of yabasic.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        open printer\r\n        line 0,0 to 200,200\r\n        text 100,100,\"Hallo\"\r\n        close window\r\n        close printer\r\n\r\n        This example will open a window, draw a line and print some text within;\r\n        everything will appear on your printer too.\r\n\r\n        See also\r\n\r\n        close printer\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        open window ? open a graphic window\r\n\r\n        Synopsis\r\n\r\n        open window x,y\r\n        open window x,y,\"font\"\r\n\r\n        Description\r\n\r\n        The open window-command opens a window of the specified size. Only one w\r\nindow\r\n        can be opened at any given moment of time.\r\n\r\n        An optional third argument specifies a font to be used for any text with\r\nin the\r\n        window. It can however be changed with any subsequent text-command.\r\n\r\n        Example\r\n\r\n        for a=200 to 400 step 10\r\n          open window a,a\r\n          for b=0 to a\r\n            line 0,b to a,b\r\n            line b,0 to b,a\r\n          sleep 0.1\r\n          close window\r\n        next a\r\n\r\n        See also\r\n\r\n        close window, text\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        or ? logical or, used in conditions\r\n\r\n        Synopsis\r\n\r\n        if (a or b) ?\r\n        while (a or b) ?\r\n\r\n        Description\r\n\r\n        Used in conditions (e.g within if or while) to join two expressions. Ret\r\nurns\r\n        true, if either its left or its right or both arguments are true; return\r\ns false\r\n        otherwise.\r\n\r\n        Example\r\n\r\n        input \"Please enter a number\"\r\n        if (a&gt;9 or a&lt;1) print \"a is not between 1 and 9\"\r\n\r\n        See also\r\n\r\n        and,not\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        or() ? arithmetic or, used for bit-operations\r\n\r\n        Synopsis\r\n\r\n        x=or(a,b)\r\n\r\n        Description\r\n\r\n        Used to compute the bitwise or of both its argument. Both arguments are \r\ntreated\r\n        as binary numbers (i.e. a series of 0 and 1); a bit of the resulting val\r\nue will\r\n        then be 1, if any of its arguments has 1 at this position in their binar\r\ny\r\n        representation.\r\n\r\n        Note, that both arguments are silently converted to integer values and t\r\nhat\r\n        negative numbers have their own binary representation and may lead to\r\n        unexpected results when passed to or.\r\n\r\n        Example\r\n\r\n        print or(14,3)\r\n\r\n        This will print 15. This result is clear, if you note, that the binary\r\n        representation of 14 and 3 are 1110 and 0011 respectively; this will yie\r\nld 1111\r\n        in binary representation or 15 as decimal.\r\n\r\n        See also\r\n\r\n        oand, eor and not\r\n\r\n        P\r\n\r\n        pause ? pause, sleep, wait for the specified number of seconds\r\n        peek ? retrieve various internal information\r\n        peek$ ? retrieve various internal string-information\r\n        pi ? a constant with the value 3.14159\r\n        poke ? change selected internals of yabasic\r\n        print ? Write to terminal or file\r\n        print color ? print with color\r\n        print colour ? see print color\r\n        putbit ? draw a rectangle of pixels encoded within a string into the gra\r\nphics\r\n            window\r\n        putscreen ? draw a rectangle of characters into the text terminal\r\n\r\n        Name\r\n\r\n        pause ? pause, sleep, wait for the specified number of seconds\r\n\r\n        Synopsis\r\n\r\n        pause 5\r\n\r\n        Description\r\n\r\n        The pause-command has many different names: You may write pause, sleep o\r\nr wait\r\n        interchangeably; whatever you write, yabasic will always do exactly the \r\nsame.\r\n\r\n        The pause-command will simply wait for the specified number of seconds. \r\nThis\r\n        may be a fractional number, so you may well wait less than a second. How\r\never,\r\n        if you try to pause for a smaller and smaller interval (e.g. 0.1 seconds\r\n, 0.01\r\n        seconds, 0.001 seconds and so on) you will find that at some point yabas\r\nic will\r\n        not wait at all. The minimal interval that can be waited depends on the \r\nsystem\r\n        (Unix, Windows) you are using.\r\n\r\n        The pause-command cannot be interrupted. However, sometimes you may want\r\n the\r\n        wait to be interruptible by simply pressing a key on the keyboard. In su\r\nch\r\n        cases you should consider using the inkey$-function, with a number of se\r\nconds\r\n        as an argument).\r\n\r\n        Example\r\n\r\n        deg=0\r\n        do\r\n          maxx=44+40*sin(deg)\r\n          for x=1 to maxx\r\n            print \"*\";\r\n          next x\r\n          pause 0.1+(maxx*maxx\/(4*84*84))\r\n          print\r\n          deg=deg+0.1\r\n        loop\r\n\r\n        This example draws a sine-curve; due to the pause-statement the speed of\r\n        drawing varies in the same way as the speed of a ball might vary, if it \r\nwould\r\n        roll along this curve under the influence of gravity.\r\n\r\n        See also\r\n\r\n        sleep, wait\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        peek ? retrieve various internal information\r\n\r\n        Synopsis\r\n\r\n        print peek(\"foo\")\r\n        a=peek(#1)\r\n\r\n        Description\r\n\r\n        The peek-function has many different and mostly unrelated uses. It is a \r\nkind of\r\n        grab-bag for retrieving all kinds of numerical information, internal to \r\nyabasic\r\n        . The meaning of the numbers returned be the peek-function depends on th\r\ne\r\n        string or number passed as an argument.\r\n\r\n        peek always returns a number, however the closely related peek$-function\r\n        exists, which may be used to retrieve string information from among the\r\n        internals of yabasic. Finally note, that some of the values which are re\r\ntrieved\r\n        with peek may even be changed, using the poke-function.\r\n\r\n        There are two variants of the peek-function: One expects an integer, pos\r\nitive\r\n        number and is described within the first entry of the list below. The ot\r\nher\r\n        variant expects one of a well defined set of strings as described in the\r\n second\r\n        and all the following entries of the list below.\r\n\r\n        peek(a)\r\n\r\n            Read a single character from the file a (which must be open of cours\r\ne).\r\n\r\n        peek(\"argument\")\r\n\r\n            Return the number of arguments, that have been passed to yabasic at\r\n            invocation time. E.g. if yabasic has been called like this: yabasic \r\nfoo.yab\r\n            bar baz, then peek(\"argument\") will return 2. This is because foo.ya\r\nb is\r\n            treated as the name of the program to run, whereas bar and baz are\r\n            considered arguments to the program, which are passed on the command\r\n line.\r\n            Note, that for windows-users, who tend to click on the icon (as oppo\r\nsed to\r\n            starting yabasic on the command line), this peekwill mostly return 0\r\n.\r\n\r\n            The function peek(\"argument\") can be written as peek(\"arguments\") to\r\no.\r\n\r\n            You will want to check out the corresponding function peek$(\"argumen\r\nt\") to\r\n            actually retrieve the arguments. Note, that each call to peek$(\"argu\r\nment\")\r\n            reduces the number returned by peek(\"argument\").\r\n\r\n        peek(\"error\")\r\n\r\n            Return a number specifying the nature of the last error in an open- \r\nor\r\n            seek-statement. Normally an error within an open-statement immediate\r\nly\r\n            terminates your program with an appropriate error-message, so there \r\nis no\r\n            chance and no need to learn more about the nature of the error. Howe\r\nver, if\r\n            you use open as a condition (e.g. if (open(#1,\"foo\")) ?) the outcome\r\n            (success or failure) of the open-operation will determine, if the co\r\nndition\r\n            evaluates to true or false. If now such an operation fails, your pro\r\ngram\r\n            will not be terminated and you might want to learn the reason for fa\r\nilure.\r\n            This reason will be returned by peek(\"error\") (as a number) or by pe\r\nek$\r\n            (\"error\") (as a string)\r\n\r\n            The table below shows the various error codes; the value returned by\r\n peek$\r\n            (\"error\") explains the nature of the error. Note, that the codes 10,\r\n11 and\r\n            12 refer to the seek-command.\r\n\r\n            Table 7.1. Error codes\r\n\r\n            +-------------------------------------------------------------------\r\n------+\r\n            |  peek   |peek$(\"error\")|                  Explanation             \r\n      |\r\n            |(\"error\")|              |                                          \r\n      |\r\n            |---------+--------------+------------------------------------------\r\n------|\r\n            |    2    |Stream already|Do not try to open one and the same filenu\r\nmber  |\r\n            |         |in use        |twice; rather close it first.             \r\n      |\r\n            |---------+--------------+------------------------------------------\r\n------|\r\n            |         |'x' is not a  |The optional filemode argument, which may \r\nbe    |\r\n            |    3    |valid filemode|passed to the open-function, has an invali\r\nd     |\r\n            |         |              |value                                     \r\n      |\r\n            |---------+--------------+------------------------------------------\r\n------|\r\n            |    4    |could not open|The open-call did not work, no further    \r\n      |\r\n            |         |'foo'         |explanation is available.                 \r\n      |\r\n            |---------+--------------+------------------------------------------\r\n------|\r\n            |         |reached       |You have opened more files than your opera\r\nting  |\r\n            |    5    |maximum number|system permits.                           \r\n      |\r\n            |         |of open files |                                          \r\n      |\r\n            |---------+--------------+------------------------------------------\r\n------|\r\n            |         |cannot open   |The commands open printer and open #1,prin\r\nter   |\r\n            |         |printer:      |both open a printer (refer to their descri\r\nption |\r\n            |    6    |already       |for the difference). However, only one can\r\n be   |\r\n            |         |printing      |active at a time; if you try to do both at\r\n the  |\r\n            |         |graphics      |same time, you will receive this error.   \r\n      |\r\n            |---------+--------------+------------------------------------------\r\n------|\r\n            |    7    |could not open|Well, it simply did not work.             \r\n      |\r\n            |         |line printer  |                                          \r\n      |\r\n            |---------+--------------+------------------------------------------\r\n------|\r\n            |    9    |invalid stream|An attempt to use an invalid (e.g. negativ\r\ne)    |\r\n            |         |number        |stream number; example: open(-1,\"foo\")    \r\n      |\r\n            |---------+--------------+------------------------------------------\r\n------|\r\n            |         |could not     |                                          \r\n      |\r\n            |   10    |position      |seek did not work.                        \r\n      |\r\n            |         |stream x to   |                                          \r\n      |\r\n            |         |byte y        |                                          \r\n      |\r\n            |---------+--------------+------------------------------------------\r\n------|\r\n            |   11    |stream x not  |You have tried to seek within a stream, th\r\nat has|\r\n            |         |open          |not been opened yet.                      \r\n      |\r\n            |---------+--------------+------------------------------------------\r\n------|\r\n            |         |seek mode 'x' |The argument, which has been passed to see\r\nk is  |\r\n            |   12    |is none of    |invalid.                                  \r\n      |\r\n            |         |begin,end,here|                                          \r\n      |\r\n            +-------------------------------------------------------------------\r\n------+\r\n\r\n        peek(\"fontheight\")\r\n\r\n            Return the height of the font used within the graphic window. If non\r\ne is\r\n            open, this peek will return the height of the last font used or 10, \r\nif no\r\n            window has been opened yet.\r\n\r\n        peek(\"screenheight\")\r\n\r\n            Return the height in characters of the window, wherein yabasic runs.\r\n If you\r\n            have not called clear screen yet, this peekwill return 0, regardless\r\n of the\r\n            size of your terminal.\r\n\r\n        peek(\"screenwidth\")\r\n\r\n            Return the width in characters of the window, wherein yabasic runs. \r\nIf you\r\n            have not called clear screen yet, this peekwill return 0, regardless\r\n of the\r\n            size of your terminal.\r\n\r\n        peek(\"secondsrunning\")\r\n\r\n            Return the number of seconds that have passed since the start of yab\r\nasic.\r\n\r\n        peek(\"millisrunning\")\r\n\r\n            Return the number of milliseconds, that have passed since the start \r\nof\r\n            yabasic.\r\n\r\n        peek(\"version\")\r\n\r\n            Return the version number of yabasic, e.g. 2.77. See also the relate\r\nd peek$\r\n            (\"version\"), which returns nearly the same information (plus the\r\n            patchlevel) as a string, e.g. \"2.77.1\".\r\n\r\n        peek(\"winheight\")\r\n\r\n            Return the height of the graphic-window in pixels. If none is open, \r\nthis\r\n            peek will return the height of the last window opened or 100, if non\r\ne has\r\n            been opened yet.\r\n\r\n        peek(\"winwidth\")\r\n\r\n            Return the width of the graphic-window in pixels. If none is open, t\r\nhis\r\n            peek will return the width of the last window opened or 100, if none\r\n has\r\n            been opened yet.\r\n\r\n        peek(\"isbound\")\r\n\r\n            Return true, if the executing yabasic-program is part of a standalon\r\ne\r\n            program; see the section about creating a standalone-program for det\r\nails.\r\n\r\n        peek(\"version\")\r\n\r\n            Return the version number of yabasic (e.g. 2.72).\r\n\r\n        Example\r\n\r\n        open \"foo\" for reading as #1\r\n        open \"bar\" for writing as #2\r\n        while(not eof(#1))\r\n          poke #2,chr$(peek(#1));\r\n        wend\r\n\r\n        This program will copy the file foo byte by byte to bar.\r\n\r\n        Note, that each peek does something entirely different, and only one has\r\n been\r\n        demonstrated above. Therefore you need to make up examples yourself for \r\nall the\r\n        other peeks.\r\n\r\n        See also\r\n\r\n        peek$, poke, open\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        peek$ ? retrieve various internal string-information\r\n\r\n        Synopsis\r\n\r\n        print peek$(\"foo\")\r\n\r\n        Description\r\n\r\n        The peek$-function has many different and unrelated uses. It is a kind o\r\nf\r\n        grab-bag for retrieving all kinds of string information, internal to yab\r\nasic;\r\n        the exact nature of the strings returned be the peek$-function depends o\r\nn the\r\n        string passed as an argument.\r\n\r\n        peek$ always returns a string, however the closely related peek-function\r\n        exists, which may be used to retrieve numerical information from among t\r\nhe\r\n        internals of yabasic. Finally note, that some of the values which are re\r\ntrieved\r\n        with peek$ may even be changed, using the poke-function.\r\n\r\n        The following list shows all possible arguments to peek$:\r\n\r\n        peek$(\"infolevel\")\r\n\r\n            Returns either \"debug\", \"note\", \"warning\", \"error\" or \"fatal\", depen\r\nding on\r\n            the current infolevel. This value can be specified with an option on\r\n the\r\n            command line or changed during the execution of the program with the\r\n            corresponding poke; however, normally only the author of yabasic (me\r\n !)\r\n            would want to change this from its default value \"warning\".\r\n\r\n        peek$(\"textalign\")\r\n\r\n            Returns one of nine possible strings, specifying the default alignme\r\nnt of\r\n            text within the graphics-window. The alignment-string returned by th\r\nis peek\r\n            describes, how the text-command aligns its string-argument with resp\r\nect to\r\n            the coordinates supplied. However, this value does not apply, if the\r\n            text-command explicitly specifies an alignment. Each of these string\r\ns is\r\n            two characters long. The first character specifies the horizontal al\r\nignment\r\n            and can be either l, r or c, which stand for left, right or center. \r\nThe\r\n            second character specifies the vertical alignment and can be one of \r\nt, b or\r\n            c, which stand for top, bottom or center respectively.\r\n\r\n            You may change this value with the corresponding command poke\r\n            \"textalign\",?; the initial value is lb, which means the top of the l\r\neft and\r\n            the top edge if the text will be aligned with the coordinates, that \r\nare\r\n            specified within the text-command.\r\n\r\n        peek$(\"windoworigin\")\r\n\r\n            This peek returns a two character string, which specifies the positi\r\non of\r\n            the origin of the coordinate system of the window; this string might\r\n be\r\n            changed with the corresponding command poke \"windoworigin\",x,y or sp\r\necified\r\n            as the argument of the origin command; see there for a detailed desc\r\nription\r\n            of the string, which might be returned by this peek.\r\n\r\n        peek$(\"program_name\")\r\n\r\n            Returns the name of the yabasic-program that is currently executing;\r\n            typically this is the name, that you have specified on the commandli\r\nne, but\r\n            without any path-components. So this peek$ might return foo.yab. As \r\na\r\n            special case when yabasic has been invoked without the name of a pro\r\ngram to\r\n            be executed this peek will return the literal strings standard input\r\n or,\r\n            when also the option -e has been specified, command line. See also p\r\neek$\r\n            (\"program_file_name\") and peek$(\"interpreter_path\") for related\r\n            information.\r\n\r\n        peek$(\"program_file_name\")\r\n\r\n            Returns the full file-name of the yabasic-program that is currently\r\n            executing; typically this is the name, that you have specified on th\r\ne\r\n            commandline, including any path-components. For the special case, th\r\nat you\r\n            have bound your yabasic-program with the interpreter to a single sta\r\nndalone\r\n            executable, this peek$ will return its name. See also peek$(\"program\r\n_name\")\r\n            and peek$(\"interpreter_path\") for related information.\r\n\r\n        peek$(\"interpreter_path\")\r\n\r\n            Return the full file-name of the yabasic-interpreter that is current\r\nly\r\n            executing your program; typically this will end on yabasic or yabasi\r\nc.exe\r\n            depending on your platform and the path will be where you installed \r\nyabasic\r\n            . For bound programs (see creating a standalone-program) however, th\r\nis may\r\n            be different and will include whatever you specified during the bind\r\n            -command.\r\n\r\n            See also peek$(\"program_name\") and peek$(\"program_file_name\") for re\r\nlated\r\n            information. Employing these, it would be possible for a yabasic-pro\r\ngram to\r\n            start itself: system(peek$(\"interpreter_path\") + \" \" + peek$\r\n            (\"program_file_name\")). Of course, in this simple form this would be\r\n a bad\r\n            idea, because this would start concurrent instances of yabasic witho\r\nut end.\r\n\r\n        peek$(\"error\")\r\n\r\n            Return a string describing the nature of the last error in an open- \r\nor\r\n            seek-statement. See the corresponding peek(\"error\") for a detailed\r\n            description.\r\n\r\n        peek$(\"library\")\r\n\r\n            Return the name of the library, this statement is contained in. See \r\nthe\r\n            import-command for a detailed description or for more about librarie\r\ns.\r\n\r\n        peek$(\"version\")\r\n\r\n            Version of yabasic as a string; e.g. 2.77.1. See also the related pe\r\nek\r\n            (\"version\"), which returns nearly the same information (minus the\r\n            patchlevel) as a number, e.g. 2.77.\r\n\r\n        peek$(\"os\")\r\n\r\n            This peek returns the name of the operating system, where your progr\r\nam\r\n            executes. This can be either windows or unix.\r\n\r\n        peek$(\"font\")\r\n\r\n            Return the name of the font, which is used for text within the graph\r\nic\r\n            window; this value can be specified as the third argument to the ope\r\nn\r\n            window-command.\r\n\r\n        peek$(\"env\",\"NAME\")\r\n\r\n            Return the environment variable specified by NAME (which may be any \r\nstring\r\n            expression). Which kind of environment variables are available on yo\r\nur\r\n            system depends, as well as their meaning, on your system; however ty\r\nping\r\n            env on the command line will produce a list (for Windows and Unix al\r\nike).\r\n            Note, that peek$(\"env\",...) can be written as peek$(\"environment\",..\r\n.) too.\r\n\r\n        peek$(\"argument\")\r\n\r\n            Return one of the arguments, that have been passed to yabasic at inv\r\nocation\r\n            time (the next call will return the the second argument, and so on).\r\n E.g.\r\n            if yabasic has been called like this: yabasic foo.yab bar baz, then \r\nthe\r\n            first call to peek$(\"argument\") will return bar. This is because foo\r\n.yab is\r\n            treated as the name of the program to run, whereas bar and baz are\r\n            considered arguments to this program, which are passed on the comman\r\nd line.\r\n            The second call to peek$(\"argument\") will return baz. Note, that for\r\n            windows-users, who tend to click on the icon (as opposed to starting\r\n            yabasic on the command line), this peekwill mostly return the empty \r\nstring.\r\n\r\n            Note, that peek$(\"argument\") can be written as peek$(\"arguments\").\r\n\r\n            Finally you will want to check out the corresponding function peek\r\n            (\"argument\").\r\n\r\n        Example\r\n\r\n        print \"You have supplied these arguments: \"\r\n        while(peek(\"argument\"))\r\n          print peek(\"argument\"),peek$(\"argument\")\r\n        wend\r\n\r\n        If you save this program in a file foo.yab and execute it via yabasic t.\r\nyab a b\r\n        c (for windows users: please use the command line for this), your will g\r\net this\r\n        output:\r\n\r\n        3a\r\n        2b\r\n        1c\r\n\r\n        See also\r\n\r\n        peek, poke, open\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        pi ? a constant with the value 3.14159\r\n\r\n        Synopsis\r\n\r\n        print pi\r\n\r\n        Description\r\n\r\n        pi is 3.14159265359 (well at least for yabasic); do not try to assign to\r\n pi\r\n        (e.g. pi=22\/7) this would not only be mathematically dubious, but would \r\nalso\r\n        result in a syntax error.\r\n\r\n        Example\r\n\r\n        for a=0 to 180\r\n          print \"The sine of \",a,\" degrees is \",sin(a*pi\/180)\r\n        next a\r\n\r\n        This program uses pi to transform an angle from degrees into radians.\r\n\r\n        See also\r\n\r\n        euler\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        poke ? change selected internals of yabasic\r\n\r\n        Synopsis\r\n\r\n        poke \"foo\",\"bar\"\r\n        poke \"foo\",baz\r\n        poke #a,\"bar\"\r\n        poke #a,baz\r\n\r\n        Description\r\n\r\n        The poke-command may be used to change details of yabasic's behaviour. L\r\nike the\r\n        related function peek, poke does many different things, depending on the\r\n        arguments supplied.\r\n\r\n        Here are the different things you can do with poke:\r\n\r\n        poke 5,a\r\n\r\n            Write the given byte (a in the example above) to the specified strea\r\nm (5#a\r\n            in the example).\r\n\r\n            See also the related function function peek(1).\r\n\r\n        poke \"dump\",\"filename.dump\"\r\n\r\n            Dump the internal form of your basic-program to the named file; this\r\n is\r\n            only useful for debugging the internals of yabasic itself.\r\n\r\n            The second argument (\"filename.dump\" in the example) should be the n\r\name of\r\n            a file, that gets overwritten with the dump, please be careful.\r\n\r\n        poke \"fontheight\",12\r\n\r\n            This poke changes the default fontheight. This can only have an effe\r\nct, if\r\n            the fonts given in the commands text or open window do not specify a\r\n            fontheight on their own.\r\n\r\n        poke \"font\",\"fontname\"\r\n\r\n            This poke specifies the default font. This can only have an effect, \r\nif you\r\n            do not supply a fontname with the commands text or open window.\r\n\r\n        poke \"infolevel\",\"debug\"\r\n\r\n            Change the amount of internal information, that yabasic outputs duri\r\nng\r\n            execution.\r\n\r\n            The second argument can be either \"debug\", \"note\", \"warning\", \"error\r\n\" or\r\n            \"fatal\". However, normally you will not want to change this from its\r\n            default value \"warning\".\r\n\r\n            See also the related peek$(\"infolevel\").\r\n\r\n        poke \"random_seed\",42\r\n\r\n            Set the seed for the random number generator; if you do this, the ra\r\nn\r\n            -function will return the same sequence of numbers every time the pr\r\nogram\r\n            is started.\r\n\r\n        poke \"stdout\",\"some text\"\r\n\r\n            Send the given text to standard output. Normally one would use print\r\n for\r\n            this purpose; however, sending e.g. control characters to your termi\r\nnal is\r\n            easier with this poke.\r\n\r\n        poke \"textalign\",\"cc\"\r\n\r\n            This poke changes the default alignment of text with respect to the\r\n            coordinates supplied within the text-command. However, this value do\r\nes not\r\n            apply, if the text-command explicitly specifies an alignment. The se\r\ncond\r\n            argument (\"cc\" in the example) must always be two characters long; t\r\nhe\r\n            first character can be one of l (left), r (right) or c (center); the\r\n second\r\n            character can be either t (top), b (bottom) or c (center); see the\r\n            corresponding peek$(\"textalign\") for a detailed description of this\r\n            argument.\r\n\r\n        poke \"windoworigin\",\"lt\"\r\n\r\n            This poke moves the origin of the coordinate system of the window to\r\n the\r\n            specified position. The second argument (\"lt\" in the example) must a\r\nlways\r\n            be two characters long; the first character can be one of l (left), \r\nr (\r\n            right) or c (center); the second character can be either t (top), b \r\n(bottom\r\n            ) or c (center). Together those two characters specify the new posit\r\nion of\r\n            the coordinate-origin. See the corresponding peek$(\"windoworigin\") f\r\nor a\r\n            more in depth description of this argument.\r\n\r\n        Example\r\n\r\n        print \"Hello, now you will see, how much work\"\r\n        print \"a simple for-loop involves ...\"\r\n        input \"Please press return \" a$\r\n        poke \"infolevel\",\"debug\"\r\n        for a=1 to 10:next a\r\n\r\n        This example only demonstrates one of the many pokes, which are describe\r\nd\r\n        above: The program switches the infolevel to debug, which makes yabasic \r\nproduce\r\n        a lot of debug-messages during the subsequent for-loop.\r\n\r\n        See also\r\n\r\n        peek, peek$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        print ? Write to terminal or file\r\n\r\n        Synopsis\r\n\r\n        print \"foo\",a$,b\r\n        print \"foo\",a$,b;\r\n        print #a \"foo\",a$\r\n        print #a \"foo\",a$;\r\n        print foo using \"##.###\"\r\n        print reverse \"foo\"\r\n        print at(10,10) a$,b\r\n        print @(10,10) a$,b\r\n        print color(\"red\",\"blue\") a$,b\r\n        print color(\"magenta\") a$,b\r\n        print color(\"green\",\"yellow\") at(5,5) a$,b\r\n\r\n        Description\r\n\r\n        The print-statement outputs strings or characters, either to your termin\r\nal\r\n        (also known as console) or to an open file.\r\n\r\n        To understand all those uses of the print-statement, let's go through th\r\ne\r\n        various lines in the synopsis above:\r\n\r\n        print \"foo\",a$,b\r\n\r\n            Print the string foo as well as the contents of the variables a$ and\r\n b onto\r\n            the screen, silently adding a newline.\r\n\r\n        print \"foo\",a$,b;\r\n\r\n            (Note the trailing semicolon !) This statement does the same as the \r\none\r\n            above; only the implicit newline is skipped, which means that the ne\r\nxt\r\n            print-statement will append seamlessly.\r\n\r\n        print #a \"foo\",a$\r\n\r\n            This is the way to write to files. The file with the number a must b\r\ne open\r\n            already, an implicit newline is added. Note the file-number #a, whic\r\nh\r\n            starts with a hash ('#') amd is separated from the rest of the state\r\nment by\r\n            a space only. The file-number (contained in the variable a) must hav\r\ne been\r\n            returned by a previous open-statement (e.g. a=open(\"bar\")).\r\n\r\n        print #a \"foo\",a$;\r\n\r\n            The same as above, but without the implicit newline.\r\n\r\n        print foo using \"##.###\"\r\n\r\n            Print the number foo with as many digits before and after the decima\r\nl dot\r\n            as given by the number of '#'-signs. See the entries for using and s\r\ntr$ for\r\n            a detailed description of this format.\r\n\r\n        print reverse \"foo\"\r\n\r\n            As all the print-variants to follow, this form of the print-statemen\r\nt can\r\n            only be issued after clear screen has been called. The strings and n\r\numbers\r\n            after the reverse-clause are simply printed inverse (compared to the\r\n normal\r\n            print-statement).\r\n\r\n        print at(10,10) a$,b\r\n\r\n            Print at the specified (x,y)-position. This is only allowed after cl\r\near\r\n            screen has been called. You may want to query peek$(\"screenwidth\") o\r\nr peek$\r\n            (\"screenheight\") to learn the actual size of your screen. You may ad\r\nd a\r\n            semicolon to suppress the implicit newline.\r\n\r\n        print @(10,10) a$,b\r\n\r\n            This is exactly the same as above, however, at may be written as @.\r\n\r\n        print color(\"red\",\"blue\") at(5,5) a$,b\r\n\r\n            Print with the specified fore- (\"red\") and background (\"blue\") color\r\n (or\r\n            colour). The possible values are \"black\", \"white\", \"red\", \"blue\", \"g\r\nreen\",\r\n            \"yellow\", \"cyan\" or \"magenta\". Again, you need to call clear screen \r\nfirst\r\n            and add a semicolon if you want to suppress the implicit newline.\r\n\r\n        print color(\"magenta\") a$,b\r\n\r\n            You may specify the foreground color only.\r\n\r\n        print color(\"green\",\"yellow\") a$,b\r\n\r\n            A color and a position (in this sequence, not the other way around) \r\nmay be\r\n            specified at once.\r\n\r\n        Example\r\n\r\n        clear screen\r\n        columns=peek(\"screenwidth\")\r\n        lines=peek(\"screenheight\")\r\n        dim col$(7)\r\n        for a=0 to 7:read col$(a):next a\r\n        data \"black\",\"white\",\"red\",\"blue\",\"green\",\"yellow\",\"cyan\",\"magenta\"\r\n\r\n        for a=0 to 2*pi step 0.1\r\n          print colour(col$(mod(i,8))) at(columns*(0.8*sin(a)+0.9)\/2,lines*(0.8*\r\ncos(a)+0.9)\/2) \"*\"\r\n          i=i+1\r\n        next a\r\n\r\n        This example draws a colored ellipse within the text window.\r\n\r\n        See also\r\n\r\n        at, print color, input, clear screen, using, ;\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        print color ? print with color\r\n\r\n        Synopsis\r\n\r\n        print color(fore$) text$\r\n        print color(fore$,back$) text$\r\n\r\n        Description\r\n\r\n        Not a separate command, but part of the print-command; may be included j\r\nust\r\n        after print and can only be issued after clear screen has been executed.\r\n\r\n        color() takes one or two string-arguments, specifying the color of the t\r\next and\r\n        (optionally) the background.\r\n\r\n        The one or two strings passed to color() can be one of these: \"black\", \"\r\nwhite\",\r\n        \"red\", \"blue\", \"green\", \"yellow\", \"cyan\" and \"magenta\" (which can be\r\n        abbreviated as \"bla\", \"whi\", \"red\", \"blu\", \"gre\", \"yel\", \"cya\" and \"mag\"\r\n        respectively).\r\n\r\n        color() can only be used, if clear scren has been issued at least once.\r\n\r\n        Note, that color() can be written as colour() too.\r\n\r\n        Example\r\n\r\n        clear screen\r\n        dim col$(7):for a=0 to 7:read col$(a):next a\r\n        do\r\n          print color(col$(ran(7)),col$(ran(7))) \" Hallo \";\r\n          pause 0.01\r\n        loop\r\n        data \"black\",\"white\",\"red\",\"blue\"\r\n        data \"green\",\"yellow\",\"cyan\",\"magenta\"\r\n\r\n        This prints the word \" Hallo \" in all colors across your screen.\r\n\r\n        See also\r\n\r\n        print, clear screen, at\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        print colour ? see print color\r\n\r\n        Synopsis\r\n\r\n        print colour(fore$) text$\r\n        print colour(fore$,back$) text$\r\n\r\n        See also\r\n\r\n        color\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        putbit ? draw a rectangle of pixels encoded within a string into the gra\r\nphics\r\n        window\r\n\r\n        Synopsis\r\n\r\n        open window 200,200\r\n        ?\r\n        a$=getbit(20,20,50,50)\r\n        ?\r\n        putbit a$,30,30\r\n        putbit a$ to 30,30\r\n        putbit a$,30,30,\"or\"\r\n\r\n        Description\r\n\r\n        The putbit-command is the counterpart of the getbit$-function. putbit re\r\nquires\r\n        a string as returned by the getbit-function. Such a string contains a re\r\nctangle\r\n        from the graphic window; the putbit-function puts such a rectangular reg\r\nion\r\n        back into the graphic-window.\r\n\r\n        Note, that the putbit-command currently accepts a fourth argument. Howev\r\ner only\r\n        the string value \"or\" is supported here. The effect is, that only those \r\npixel,\r\n        which are set in the string will be set in the graphic window. Those pix\r\nels,\r\n        which are not set in the string, will not change in the window (as oppos\r\ned to\r\n        being cleared).\r\n\r\n        Example\r\n\r\n        c$=\"rgb 21,21:0000000000000000000000000000000000000000000000000000000000\r\n000032c8000000000000000000000000000000000000000000000000000000000000000000000000\r\n0000000000000000000000000032c80032c80032c80032c80032c80032c80032c80032c80032c800\r\n00000000000000000000000000000000000000000000000000000000000032c80032c80032c80032\r\nc80032c80032c80032c80032c80032c80032c80032c80032c8000000000000000000000000000000\r\n0000000000000000000032c80032c80032c80032c80032c80032c80032c80032c80032c80032c800\r\n32c80032c80032c80032c80032c80000000000000000000000000000000032c80032c80032c80032\r\nc80032c80032c80032c80032c8c8ff000032c80032c80032c80032c80032c80032c80032c8000000\r\n0000000000000000000000000032c80032c80032c80032c80032c8c8ff00c8ff00c8ff00c8ff00c8\r\nff00c8ff00c8ff000032c80032c80032c80032c80032c80000000000000000000032c80032c80032\r\nc80032c80032c8c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff000032c80032c8\r\n0032c80032c80032c80000000000000032c80032c80032c80032c8c8ff00c8ff00c8ff00c8ff00c8\r\nff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff000032c80032c80032c80032c80000000000000032\r\nc80032c80032c80032c8c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00\r\nc8ff000032c80032c80032c80032c80000000000000032c80032c80032c80032c8c8ff00c8ff00c8\r\nff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff000032c80032c80032c80032c80000\r\n000032c80032c80032c80032c8c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00\r\nc8ff00c8ff00c8ff000032c80032c80032c80032c80000000000000032c80032c80032c80032c8c8\r\nff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff000032c80032c80032\r\nc80032c80000000000000032c80032c80032c80032c8c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00\r\nc8ff00c8ff00c8ff00c8ff00c8ff000032c80032c80032c80032c80000000000000032c80032c800\r\n32c80032c8c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff000032\r\nc80032c80032c80032c80000000000000032c80032c80032c80032c80032c8c8ff00c8ff00c8ff00\r\nc8ff00c8ff00c8ff00c8ff00c8ff00c8ff000032c80032c80032c80032c80032c800000000000000\r\n00000032c80032c80032c80032c80032c8c8ff00c8ff00c8ff00c8ff00c8ff00c8ff00c8ff000032\r\nc80032c80032c80032c80032c80000000000000000000000000032c80032c80032c80032c80032c8\r\n0032c80032c80032c80032c80032c80032c80032c80032c80032c80032c80032c800000000000000\r\n00000000000000000000000032c80032c80032c80032c80032c80032c80032c80032c80032c80032\r\nc80032c80032c80032c80032c80032c80000000000000000000000000000000000000000000032c8\r\n0032c80032c80032c80032c80032c80032c80032c80032c80032c80032c80032c800000000000000\r\n00000000000000000000000000000000000000000000000000000032c80032c80032c80032c80032\r\nc80032c80032c80032c80032c8000000000000000000000000000000000000000000000000000000\r\n00000000000000000000000000000000000000000000000000000000000000000000000000000000\r\n0000000000000000000000000000\"\r\n\r\n        open window 200,200\r\n\r\n        do\r\n          x=ran(220)-10\r\n          y=ran(220)-10\r\n          putbit c$,x,y,\"transparent\"\r\n        loop\r\n\r\n        This program uses a precanned string (containing the image of a blue cir\r\ncle\r\n        with a yellow centre) and draws it repeatedly into the graphic-window. T\r\nhe mode\r\n        \"transparent\" ensures, that no pixels will be cleared.\r\n\r\n        There are two possible values for the third argument of putbit. Both mod\r\nes\r\n        differ in the way, they replace (or not) any pixels from the window with\r\n pixels\r\n        from the bitmap having the background colour.\r\n\r\n        transparent or t\r\n\r\n            With this mode the pixels from the window will be kept, if the bitma\r\np\r\n            contains pixels with background colour at this position; i.e. the bi\r\ntmap is\r\n            transparent\r\n\r\n        solid or s\r\n\r\n            With this mode the pixels from the window will be overpainted with t\r\nhe\r\n            pixels from the bitmap in any case; i.e. the bitmap is solid\r\n\r\n        If you omit this argument, the default transparent applies.\r\n\r\n        See also\r\n\r\n        getbit$, open window\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        putscreen ? draw a rectangle of characters into the text terminal\r\n\r\n        Synopsis\r\n\r\n        clear screen\r\n        ?\r\n        a$=getscreen$(5,5,10,10)\r\n        ?\r\n        putscreen a$,7,7\r\n\r\n        Description\r\n\r\n        The putscreen-command is the counterpart of the getscreen$-function. put\r\nscreen\r\n        requires a string as returned by the getscreen-function. Such a string c\r\nontains\r\n        a rectangular detail from the terminal; the putscreen-function puts such\r\n a\r\n        region back into the terminal-window.\r\n\r\n        Note, that clear screen must have been called before.\r\n\r\n        Example\r\n\r\n        clear screen\r\n        for a=1 to 200\r\n          print color(\"red\") \"Hallo !\";\r\n          print color(\"blue\") \"Welt !\";\r\n        next a\r\n        r$=getscreen$(0,0,20,20)\r\n        for x=0 to 60\r\n          putscreen r$,x,0\r\n          sleep 0.1\r\n        next x\r\n\r\n        This example prints the string \"Hallo !Welt !\" all over the screen and t\r\nhen\r\n        moves a rectangle from one side to the other.\r\n\r\n        See also\r\n\r\n        getscreen$, clear screen\r\n\r\n        R\r\n\r\n        ran() ? return a random number\r\n        read ? read data from data-statements\r\n        rectangle ? draw a rectangle\r\n        redim ? create an array prior to its first use. A synonym for dim\r\n        rem ? start a comment\r\n        repeat ? start a repeat-loop\r\n        restore ? reposition the data-pointer\r\n        return ? return from a subroutine or a gosub\r\n        reverse ? print reverse (background and foreground colors exchanged)\r\n        right$() ? return (or change) the right end of a string\r\n        rinstr() ? find the rightmost occurrence of one string within the other\r\n        rtrim$() ? trim spaces at the right end of a string\r\n\r\n        Name\r\n\r\n        ran() ? return a random number\r\n\r\n        Synopsis\r\n\r\n        print ran()\r\n        x=ran(y)\r\n\r\n        Description\r\n\r\n        The ran-function returns a random number. If no argument is given, the n\r\number\r\n        returned is in the range from 0 to 1; where only 0 is a possible value; \r\n1 will\r\n        never be returned. If an argument is supplied, the number returned will \r\nbe in\r\n        the range from 0 up to this argument, whereas this argument itself is no\r\nt a\r\n        possible return value. Regardless of the range, ran is guaranteed to hav\r\ne\r\n        exactly 2**30 different return values.\r\n\r\n        If you call ran multiple times during your program, the sequence of rand\r\nom\r\n        numbers will be different each time you invoke your program; however, if\r\n, e.g.\r\n        for testing you prefer to always have the same sequence of random number\r\ns you\r\n        may issue poke \"random_seed\",123.\r\n\r\n        Example\r\n\r\n        clear screen\r\n        c=peek(\"screenwidth\")-1\r\n        l=peek(\"screenheight\")\r\n\r\n        dim col$(8)\r\n        for a=0 to 7:read col$(a):next a\r\n        data \"black\",\"white\",\"red\",\"blue\",\"green\",\"yellow\",\"cyan\",\"magenta\"\r\n\r\n        do\r\n          x=ran(c)\r\n          y=l-ran(l*exp(-32*((x\/c-1\/2)**2)))\r\n          i=i+1\r\n          print color(col$(mod(i,8))) at(x,y) \"*\";\r\n        loop\r\n\r\n        This example will print a colored bell-curve.\r\n\r\n        See also\r\n\r\n        int\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        read ? read data from data-statements\r\n\r\n        Synopsis\r\n\r\n        read a$,a\r\n        ?\r\n        data \"Hello !\",7\r\n\r\n        Description\r\n\r\n        The read-statement retrieves literal data, which is stored within\r\n        data-statements elsewhere in your program.\r\n\r\n        Example\r\n\r\n        read num\r\n        dim col$(num)\r\n        for a=1 to num:read col$(a):next a\r\n        clear screen\r\n        print \"These are the colours known to yabasic:\\n\"\r\n        for a=1 to num\r\n          print colour(col$(a)) col$(a)\r\n        next a\r\n\r\n        data 8,\"black\",\"white\",\"red\",\"blue\"\r\n        data \"green\",\"yellow\",\"cyan\",\"magenta\"\r\n\r\n        This program prints the names of the colors known to yabasic in those ve\r\nry\r\n        colors.\r\n\r\n        See also\r\n\r\n        data, restore\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        rectangle ? draw a rectangle\r\n\r\n        Synopsis\r\n\r\n        open window 100,100\r\n        rectangle 10,10 to 90,90\r\n        rectangle 20,20,80,80\r\n        rect 20,20,80,80\r\n        box 30,30,70,70\r\n        clear rectangle 30,30,70,70\r\n        fill rectangle 40,40,60,60\r\n        clear fill rectangle 60,60,40,40\r\n\r\n        Description\r\n\r\n        The rectangle-command (also known as box or rect, for short) draws a rec\r\ntangle;\r\n        it accepts four parameters: The x- and y-coordinates of two facing corne\r\nrs of\r\n        the rectangle. With the optional clauses clear and fill (which may appea\r\nr\r\n        together and in any sequence) the rectangle can be cleared and filled\r\n        respectively.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        c=1\r\n        do\r\n          for phi=0 to pi step 0.1\r\n            if (c) then\r\n              rectangle 100+100*sin(phi),100+100*cos(phi) to 100-100*sin(phi),10\r\n0-100*cos(phi)\r\n            else\r\n              clear rectangle 100+100*sin(phi),100+100*cos(phi) to 100-100*sin(p\r\nhi),100-100*cos(phi)\r\n            endif\r\n            sleep 0.1\r\n          next phi\r\n          c=not c\r\n        loop\r\n\r\n        This example draws a nice animated pattern; watch it for a couple of hou\r\nrs, to\r\n        see how it develops.\r\n\r\n        See also\r\n\r\n        open window, open printer, line, circle, triangle\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        redim ? create an array prior to its first use. A synonym for dim\r\n\r\n        Synopsis\r\n\r\n        See the dim-command.\r\n\r\n        Description\r\n\r\n        The redim-command does exactly the same as the dim-command; it is just a\r\n        synonym. redim has been around in older versions of basic (not even yaba\r\nsic)\r\n        for many years; therefore it is supported in yabasic for compatibility r\r\neasons.\r\n\r\n        Please refer to the entry for the dim-command for further information.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        rem ? start a comment\r\n\r\n        Synopsis\r\n\r\n        rem  Hey, this is a comment\r\n        #    the hash-sign too (at beginning of line)\r\n        \/\/ even the double slash\r\n        ' and the single quote (at beginning of line)\r\n        print \"Not a comment\" #    This is an error !!\r\n        print \"Not a comment\":\/\/   But this is again a valid comment\r\n        print \"Not a comment\" \/\/   even this.\r\n        print \"Not a comment\" rem  and this !\r\n\r\n        Description\r\n\r\n        rem introduces a comment (like # or \/\/), that extends up to the end of t\r\nhe\r\n        line.\r\n\r\n        Those comments do not even need a colon (':') in front of them; they (re\r\nm, #, '\r\n        (single quite) and \/\/) all behave alike except for # and ', which may on\r\nly\r\n        appear at the very beginning of a line; therefore the fourth example in \r\nthe\r\n        synopsis above (print \"Not a comment\" # This is an error !!) is indeed a\r\nn\r\n        error.\r\n\r\n        Note, that rem is an abbreviation for remark. remark however is not a va\r\nlid\r\n        command in yabasic.\r\n\r\n        Finally note, that a comment introduced with '#' may have a special mean\r\ning\r\n        under unix; see the entry for # for details.\r\n\r\n        Example\r\n\r\n        #\r\n        rem   comments on data structures\r\n        #     are more useful than\r\n        \/\/    comments on algorithms.\r\n        rem\r\n\r\n        This program does nothing, but in a splendid and well commented way.\r\n\r\n        See also\r\n\r\n        #, \/\/\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        repeat ? start a repeat-loop\r\n\r\n        Synopsis\r\n\r\n        repeat\r\n          ?\r\n        until (?)\r\n\r\n        Description\r\n\r\n        The repeat-loop executes all the statements up to the final until-keywor\r\nd over\r\n        and over. The loop is executed as long as the condition, which is specif\r\nied\r\n        with the until-clause, becomes true. By construction, the statements wit\r\nhin the\r\n        loop are executed at least once.\r\n\r\n        Example\r\n\r\n        x=0\r\n        clear screen\r\n        print \"This program will print the numbers from 1 to 10\"\r\n        repeat\r\n          x=x+1\r\n          print x\r\n          print \"Press any key for the next number, or 'q' to quit\"\r\n          if (inkey$=\"q\") break\r\n        until(x=10)\r\n\r\n        This program is pretty much useless, but self-explanatory.\r\n\r\n        See also\r\n\r\n        until, break, while, do\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        restore ? reposition the data-pointer\r\n\r\n        Synopsis\r\n\r\n        read a,b,c,d,e,f\r\n        restore\r\n        read g,h,i\r\n        restore foo\r\n        data 1,2,3\r\n        label foo\r\n        data 4,5,6\r\n\r\n        Description\r\n\r\n        The restore-command may be used to reset the reading of data-statements,\r\n so\r\n        that the next read-statement will read data from the first data-statemen\r\nt.\r\n\r\n        You may specify a label with the restore-command; in that case, the next\r\n        read-statement will read data starting at the given label. If the label \r\nis\r\n        omitted, reading data will begin with the first data-statement within yo\r\nur\r\n        program.\r\n\r\n        Example\r\n\r\n        input \"Which language (german\/english) ? \" l$\r\n        if (instr(\"german\",l$)&gt;0) then\r\n          restore german\r\n        else\r\n          restore english\r\n        endif\r\n\r\n        for a=1 to 3\r\n          read x,x$\r\n          print x,\"=\",x$\r\n        next a\r\n\r\n        label english\r\n        data 1,\"one\",2,\"two\",3,\"three\"\r\n        label german\r\n        data 1,\"eins\",2,\"zwei\",3,\"drei\"\r\n\r\n        This program asks to select one of those languages known to me (i.e. eng\r\nlish or\r\n        german) and then prints the numbers 1,2 and 3 and their textual equivale\r\nnts in\r\n        the chosen language.\r\n\r\n        See also\r\n\r\n        read, data, label\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        return ? return from a subroutine or a gosub\r\n\r\n        Synopsis\r\n\r\n        gosub foo\r\n        ?\r\n        label foo\r\n        ?\r\n        return\r\n\r\n        sub bar(baz)\r\n          ?\r\n          return quertz\r\n        end sub\r\n\r\n        Description\r\n\r\n        The return-statement serves two different (albeit somewhat related) purp\r\noses.\r\n        The probably more important use of return is to return control from with\r\nin a\r\n        subroutine to the place in your program, where the subroutine has been c\r\nalled.\r\n        If the subroutine is declared to return a value, the return-statement mi\r\nght be\r\n        accompanied by a string or number, which constitutes the return value of\r\n the\r\n        subroutine.\r\n\r\n        However, even if the subroutine should return a value, the return-statem\r\nent\r\n        need not carry a value; in that case the subroutine will return 0 or the\r\n empty\r\n        string (depending on the type of the subroutine). Moreover, feel free to\r\n place\r\n        multiple return-statements within your subroutine; it's a nice way of\r\n        controlling the flow of execution.\r\n\r\n        The second (but historically first) use of return is to return to the po\r\nsition,\r\n        where a prior gosub has left off. In that case return may not carry a va\r\nlue.\r\n\r\n        Example\r\n\r\n        do\r\n          read a$\r\n          if (a$=\"\") then\r\n            print\r\n            end\r\n          endif\r\n          print mark$(a$),\" \";\r\n        loop\r\n\r\n        data \"The\",\"quick\",\"brown\",\"fox\",\"jumped\"\r\n        data \"over\",\"the\",\"lazy\",\"dog\",\"\"\r\n\r\n        sub mark$(a$)\r\n          if (instr(lower$(a$),\"q\")) return upper$(a$)\r\n          return a$\r\n        end sub\r\n\r\n        This example features a subroutine mark$, that returns its argument in u\r\npper\r\n        case, if it contains the letter \"q\", or unchanged otherwise. In the test\r\n-text\r\n        the word quick will end up being marked as QUICK.\r\n\r\n        The example above demonstrates return within subroutines; please see gos\r\nub for\r\n        an example of how to use return in this context.\r\n\r\n        See also\r\n\r\n        sub, gosub\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        reverse ? print reverse (background and foreground colors exchanged)\r\n\r\n        Synopsis\r\n\r\n        clear screen\r\n        ?\r\n        print reverse \"foo\"\r\n\r\n        Description\r\n\r\n        reverse may be used to print text in reverse. reverse is not a separate\r\n        command, but part of the print-command; it may be included just after th\r\ne print\r\n        and can only be issued once that clear screen has been issued.\r\n\r\n        Example\r\n\r\n        clear screen\r\n\r\n        print \"1 \";\r\n        c=3\r\n        do\r\n          prim=true\r\n          for a=2 to sqrt(c)\r\n            if (frac(c\/a)=0) then\r\n              prim=false\r\n              break\r\n            endif\r\n          next a\r\n          if (prim) then\r\n            print\r\n            print reverse c;\r\n          else\r\n            print c;\r\n          endif\r\n          print \" \";\r\n          c=c+1\r\n        loop\r\n\r\n        This program prints numbers from 1 on and marks each prime number in rev\r\nerse.\r\n\r\n        See also\r\n\r\n        at, print color, print, clear screen\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        right$() ? return (or change) the right end of a string\r\n\r\n        Synopsis\r\n\r\n        print right$(a$,2)\r\n        right$(b$,2)=\"baz\"\r\n\r\n        Description\r\n\r\n        The right$-function requires two arguments (a string and a number) and r\r\neturns\r\n        the part from the right end of the string, whose length is specified by \r\nits\r\n        second argument. So, right$ simply returns the requested number of chars\r\n from\r\n        the right end of the given string.\r\n\r\n        Note, that the right$-function can be assigned to, i.e. it may appear on\r\n the\r\n        left hand side of an assignment. In this way it is possible to change a \r\npart of\r\n        the variable used within the right$-function. Note, that that way the le\r\nngth of\r\n        the string cannot be changed, i.e. characters might be overwritten, but \r\nnot\r\n        added. For an example see below.\r\n\r\n        Example\r\n\r\n        print \"Please enter a length either in inch or centimeter\"\r\n        print \"please add 'in' or 'cm' to mark the unit.\"\r\n        input \"Length: \" a$\r\n        if (right$(a$,2)=\"in\") then\r\n           length=val(a$)*2.56\r\n        elsif (right$(a$,2)=\"cm\") then\r\n           length=val(a$)\r\n        else\r\n           error \"Invalid input: \"+a$\r\n        endif\r\n\r\n        This program allows the user to enter a length qualified with a unit (ei\r\nther\r\n        inch or centimeter).\r\n\r\n        This second example demonstrates the capability to assign to the\r\n        right$-function.\r\n\r\n        a$=\"Heiho World !\"\r\n        print a$\r\n        right$(a$,7)=\"dwarfs.\"\r\n        print a$\r\n\r\n        See also\r\n\r\n        right$ and mid$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        rinstr() ? find the rightmost occurrence of one string within the other\r\n\r\n        Synopsis\r\n\r\n        pos=rinstr(\"Thequickbrownfox\",\"equi\")\r\n        pos=rinstr(a$,b$,x)\r\n\r\n        Description\r\n\r\n        The rinstr-function accepts two string-arguments and tries to find the s\r\necond\r\n        within the first. However, unlike the instr, the rinstr-function finds t\r\nhe\r\n        rightmost (or last) occurrence of the string; whereas the instr-function\r\n finds\r\n        the leftmost (or first) occurrence. In any case however, the position is\r\n        counted from the left.\r\n\r\n        If you supply a third, numeric argument to the rinstr-function, it will \r\nbe used\r\n        as a starting point for the search. Therefore rinstr(\"abcdeabcdeabcde\",\"\r\ne\",8)\r\n        will return 5, because the search for an \"e\" starts at position 8 and fi\r\nnds the\r\n        first one at position 5.\r\n\r\n        Example\r\n\r\n        print rinstr(\"foofoofoobar\",\"foo\")\r\n\r\n        This simple example will print 7, because it finds the rightmost among t\r\nhe\r\n        three occurrences of foo within the string. Note, that\r\n\r\n        print instr(\"foofoofoobar\",\"foo\")\r\n\r\n        would have printed 1.\r\n\r\n        See also\r\n\r\n        instr\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        rtrim$() ? trim spaces at the right end of a string\r\n\r\n        Synopsis\r\n\r\n        a$=rtrim$(b$)\r\n\r\n        Description\r\n\r\n        The rtrim$-function removes all whitespace from the right end of a strin\r\ng and\r\n        returns the result.\r\n\r\n        Example\r\n\r\n        open 1,\"foo\"\r\n        dim lines$(100)\r\n        l=1\r\n        while(not eof(1))\r\n          input #1 a$\r\n          a$=rtrim$(a$)\r\n          if (right$(line$,1)=\"\\\\\") then\r\n            line$=line$+\" \"+a$\r\n          else\r\n            lines$(l)=line$\r\n            l=l+1\r\n            line$=a$\r\n          endif\r\n        end while\r\n        print \"Read \",l,\" lines\"\r\n\r\n        This example reads the file foo allowing for continuation lines, which a\r\nre\r\n        marked by a \\, which appears as the last character on a line. For conven\r\nience\r\n        whitespace at the right end of a line is trimmed with rtrim.\r\n\r\n        See also\r\n\r\n        ltrim$, trim$\r\n\r\n        S\r\n\r\n        screen ? as clear screen clears the text window\r\n        seek() ? change the position within an open file\r\n        sig() ? return the sign of its argument\r\n        sin() ? return the sine of its single argument\r\n        sleep ? pause, sleep, wait for the specified number of seconds\r\n        split() ? split a string into many strings\r\n        sqr() ? compute the square of its argument\r\n        sqrt() ? compute the square root of its argument\r\n        static ? preserves the value of a variable between calls to a subroutine\r\n        step ? specifies the increment step in a for-loop\r\n        str$() ? convert a number into a string\r\n        sub ? declare a user defined subroutine\r\n        switch ? select one of many alternatives depending on a value\r\n        system() ? hand a statement over to your operating system and return its\r\n            exitcode\r\n        system$() ? hand a statement over to your operating system and return it\r\ns\r\n            output\r\n\r\n        Name\r\n\r\n        screen ? as clear screen clears the text window\r\n\r\n        Synopsis\r\n\r\n        clear screen\r\n\r\n        Description\r\n\r\n        The keyword screen appears only within the sequence clear screen; please\r\n see\r\n        there for a description.\r\n\r\n        See also\r\n\r\n        clear screen\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        seek() ? change the position within an open file\r\n\r\n        Synopsis\r\n\r\n        open 1,\"foo\"\r\n        seek #1,q\r\n        seek #1,x,\"begin\"\r\n        seek #1,y,\"end\"\r\n        seek #1,z,\"here\"\r\n\r\n        Description\r\n\r\n        The seek-command changes the position, where the next input (or peek) st\r\natement\r\n        will read from an open file. Usually files are read from the beginning t\r\no the\r\n        end sequentially; however sometimes you may want to depart from this sim\r\nple\r\n        scheme. This can be done with the seek-command, allowing you to change t\r\nhe\r\n        position, where the next piece of data will be read from the file.\r\n\r\n        seek accepts two or three arguments: The first one is the number of an a\r\nlready\r\n        open file. The second one is the position where the next read from the f\r\nile\r\n        will start. The third argument is optional and specifies the the point f\r\nrom\r\n        where the position (the second argument) will count. It can be one of:\r\n\r\n        begin\r\n\r\n            Count from the beginning of the file.\r\n\r\n        end\r\n\r\n            Count from the end of the file.\r\n\r\n        here\r\n\r\n            Count from the current position within the file.\r\n\r\n        Example\r\n\r\n        open #1,\"count.dat\",\"w\"\r\n        for a=1 to 10\r\n          print #1,\"00000000\";\r\n          if (a&lt;10) print #1,\";\";\r\n        next a\r\n\r\n        dim count(10)\r\n        do\r\n          x=int(ran(10))\r\n          i=i+1\r\n          if (mod(i,1000)=0) print \".\";\r\n          count(x)=count(x)+1\r\n          curr$=right$(\"00000000\"+str$(count(x)),8)\r\n          seek #1,9*x,\"begin\"\r\n          print #1,curr$;\r\n        loop\r\n\r\n        This example increments randomly one of ten counters (in the array count\r\n());\r\n        however, the result is always kept and updated within the file count.dat\r\n, so\r\n        even in case of an unexpected interrupt, the result will not be lost.\r\n\r\n        See also\r\n\r\n        tell, open, print, peek\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        sig() ? return the sign of its argument\r\n\r\n        Synopsis\r\n\r\n        a=sig(b)\r\n\r\n        Description\r\n\r\n        Return +1, -1 or 0, if the single argument is positive, negative or zero\r\n.\r\n\r\n        Example\r\n\r\n        clear screen\r\n        dim c$(3):c$(1)=\"red\":c$(2)=\"white\":c$(3)=\"green\"\r\n        do\r\n          num=ran(100)-50\r\n          print color(c$(2+sig(num))) num\r\n        loop\r\n\r\n        This program prints an infinite sequence of random number; positive numb\r\ners are\r\n        printed in green, negative numbers are printed red (an exact zero would \r\nbe\r\n        printed white). (With a little extra work, this program could be easily\r\n        extended into a brokerage system)\r\n\r\n        See also\r\n\r\n        abs, int, frac\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        sin() ? return the sine of its single argument\r\n\r\n        Synopsis\r\n\r\n        y=sin(angle)\r\n\r\n        Description\r\n\r\n        The sin-function expects an angle (in radians, not degrees) and returns \r\nits\r\n        sine.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        new curve\r\n        for phi=0 to 2*pi step 0.1\r\n          line to 100+90*sin(phi),100+90*cos(phi)\r\n        next phi\r\n        close curve\r\n\r\n        This program draws a circle (ignoring the existence of the circle-comman\r\nd).\r\n\r\n        See also\r\n\r\n        asin, cos\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        sleep ? pause, sleep, wait for the specified number of seconds\r\n\r\n        Synopsis\r\n\r\n        sleep 4\r\n\r\n        Description\r\n\r\n        The sleep-command has many different names: You may write pause, sleep o\r\nr wait\r\n        interchangeably; whatever you write, yabasic will always do exactly the \r\nsame.\r\n\r\n        Therefore you should refer to the entry for the pause-function for furth\r\ner\r\n        information.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        split() ? split a string into many strings\r\n\r\n        Synopsis\r\n\r\n        dim w$(10)\r\n        ?\r\n        num=split(a$,w$())\r\n        num=split(a$,w$(),s$)\r\n\r\n        Description\r\n\r\n        The split-function requires a string (containing the text to be split), \r\na\r\n        reference to a string-array (which will receive the resulting strings, i\r\n.e. the\r\n        tokens) and an optional string (with a set of characters, at which to sp\r\nlit,\r\n        i.e. the delimiters).\r\n\r\n        The split-function regards its first argument (a string) as a list of to\r\nkens\r\n        separated by delimiters and it will store the list of tokens within the\r\n        array-reference you have supplied. Note, that the array, which is passed\r\n as a\r\n        reference (w$() in the synopsis), will be resized accordingly, so that y\r\nou\r\n        don't have to figure out the number of tokens in advance. The element at\r\n        position zero (i.e. w$(0)) will not be used.\r\n\r\n        normally (i.e. if you omit the third, which is the delimiter-argument) t\r\nhe\r\n        function will regard space or tab as delimiters for tokens; however by\r\n        supplying a third argument, you may split at any single of the character\r\ns\r\n        within this string. E.g. if you supply \":;\" as the third argument, then \r\ncolon\r\n        (:) or semicolon (;) will delimit tokens.\r\n\r\n        Note, that a sequence of separator-characters will produce a sequence of\r\n empty\r\n        tokens; that way, the number of tokens returned will always be one plus \r\nthe\r\n        number of separator characters contained within the string. Refer to the\r\n        closely related token-function, if you do not like this behaviour. In so\r\nme way,\r\n        the split-function focuses on the separators (other than the token-funct\r\nion,\r\n        which focuses on the tokens), hence its name.\r\n\r\n        The second argument is a reference on a string-array, where the tokens w\r\nill be\r\n        stored; this array will be expanded (or shrunk) to have room for all tok\r\nens, if\r\n        necessary.\r\n\r\n        The first argument finally contains the text, that will be split into to\r\nkens.\r\n        The split-function returns the number of tokens that have been found.\r\n\r\n        Please see the examples below for some hints on the exact behaviour of t\r\nhe\r\n        split-function and how it differs from the token-function:\r\n\r\n        Example\r\n\r\n        print \"This program will help you to understand, how the\"\r\n        print \"split()-function exactly works and how it behaves\"\r\n        print \"in certain special cases.\"\r\n        print\r\n        print \"Please enter a line containing tokens separated\"\r\n        print \"by either '=' or '-'\"\r\n        dim t$(10)\r\n        do\r\n          print\r\n          input \"Please enter a line: \" l$\r\n          num=split(l$,t$(),\"=-\")\r\n          print num,\" Tokens: \";\r\n          for a=1 to num\r\n            if (t$(a)=\"\") then\r\n              print \"(EMPTY)\";\r\n            else\r\n              print t$(a);\r\n            endif\r\n            if (a&lt;num) print \",\";\r\n          next a\r\n          print\r\n        loop\r\n\r\n        This program prints the following output:\r\n\r\n        Please enter a line: a\r\n        1 Tokens: a\r\n\r\n        Please enter a line:\r\n        0 Tokens:\r\n\r\n        Please enter a line: ab\r\n        1 Tokens: ab\r\n\r\n        Please enter a line: a=b\r\n        2 Tokens: a,b\r\n\r\n        Please enter a line: a-\r\n        2 Tokens: a,(EMPTY)\r\n\r\n        Please enter a line: a-=\r\n        3 Tokens: a,(EMPTY),(EMPTY)\r\n\r\n        Please enter a line: =a-\r\n        3 Tokens: (EMPTY),a,(EMPTY)\r\n\r\n        Please enter a line: a=-b\r\n        3 Tokens: a,(EMPTY),b\r\n\r\n        Please enter a line: a--b-\r\n        4 Tokens: a,(EMPTY),b,(EMPTY)\r\n\r\n        Please enter a line: -a==b-c==\r\n        7 Tokens: (EMPTY),a,(EMPTY),b,c,(EMPTY),(EMPTY)\r\n\r\n        See also\r\n\r\n        token\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        sqr() ? compute the square of its argument\r\n\r\n        Synopsis\r\n\r\n        a=sqr(b)\r\n\r\n        Description\r\n\r\n        The sqr-function computes the square of its numerical argument (i.e. it\r\n        multiplies its argument with itself).\r\n\r\n        Example\r\n\r\n        for a=1 to 10\r\n          print a,sqr(a),a**2\r\n        next a\r\n\r\n        As you may see from the output, sqr can be written as **2 (or ^2) too.\r\n\r\n        See also\r\n\r\n        sqrt, **, ^\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        sqrt() ? compute the square root of its argument\r\n\r\n        Synopsis\r\n\r\n        to be written\r\n\r\n        Description\r\n\r\n        The sqrt-function computes the square root of its numerical argument.\r\n\r\n        Example\r\n\r\n        for a=1 to 5\r\n          print a,sqrt(a),a**(1\/2)\r\n        next a\r\n\r\n        As you may see from the output, sqrt can be written as **(1\/2) (or ^(1\/2\r\n)) too.\r\n\r\n        See also\r\n\r\n        sqr, **, ^\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        static ? preserves the value of a variable between calls to a subroutine\r\n\r\n        Synopsis\r\n\r\n        sub foo()\r\n\r\n          static a\r\n\r\n          ?\r\n\r\n        end sub\r\n\r\n        Description\r\n\r\n        The static keyword can be used within subroutines to mark variables as s\r\ntatic.\r\n        This has two effects: First, the variable is local to the subroutine, i.\r\ne. its\r\n        value is not know outside the subroutine (this is the effect of the loca\r\nl\r\n        keyword). Second, the static-keyword arranges things, so that the variab\r\nle\r\n        keeps its value between invocations of the subroutine (this is different\r\n from\r\n        the local-keyword).\r\n\r\n        Example\r\n\r\n        foo()\r\n        foo()\r\n        foo()\r\n\r\n        sub foo()\r\n          static a\r\n          local b\r\n          a=a+1\r\n          b=b+1\r\n          print a,b\r\n        end sub\r\n\r\n        This program shows the difference between static and local variables wit\r\nhin a\r\n        subroutine; it produces this output:\r\n\r\n        1 1\r\n        2 1\r\n        3 1\r\n\r\n        The output shows, that the static variable a keeps its value between sub\r\nroutine\r\n        calls, whereas b is initialized with the value 0 at every call to the\r\n        subroutine foo.\r\n\r\n        See also\r\n\r\n        sub, local\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        step ? specifies the increment step in a for-loop\r\n\r\n        Synopsis\r\n\r\n        for a=1 to 10 step 3\r\n          ?\r\n        next a\r\n\r\n        Description\r\n\r\n        Specify, by which amount the loop-variable of a for-loop will be increme\r\nnted at\r\n        each step.\r\n\r\n        The step (as well as the lower and upper bound) are computed anew in eac\r\nh step;\r\n        this is not common, but possible, as the example below demonstrates.\r\n\r\n        Example\r\n\r\n        for x=1 to 1000 step y\r\n          y=x+y\r\n          print x,\" \",y,\" \";\r\n        next x\r\n        print\r\n\r\n        This program computes the fibonacci numbers between 1 and 1000.\r\n\r\n        See also\r\n\r\n        for\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        str$() ? convert a number into a string\r\n\r\n        Synopsis\r\n\r\n        a$=str$(a)\r\n        b$=str$(x,\"##.###\")\r\n        b$=str$(x,\"###,###.##\")\r\n        b$=str$(x,\"###,###.##\",\"_.\")\r\n\r\n        Description\r\n\r\n        The str$-function accepts a numeric argument and returns it as a string.\r\n This\r\n        conversion between number and string can be controlled with the optional\r\n third\r\n        argument (the format argument). See the following table of examples to l\r\nearn\r\n        about valid values of this argument. Note, that those examples fall in o\r\nne of\r\n        two categories: C-style and basic-style; the first 4 examples in the tab\r\nle\r\n        below are C-style, the rest of the examples are basic-style. For more\r\n        information on the C-style formats, you may refer to your favorite\r\n        documentation on the C programming language. The basic-style formats are\r\n much\r\n        simpler, they just depict the desired output, marking digits with '#'; g\r\nroups\r\n        of (usually three) digits may be separated with colons (','), the decima\r\nl dot\r\n        must be marked by a literal dot ('.'). Moreover these characters (colons\r\n and\r\n        dot) may be replaced by other characters to satisfy the needs of non-eng\r\nlish\r\n        (e.g. german) languages; see the examples below.\r\n\r\n        Note, that for clarity, each space in the result has been replaced by th\r\ne\r\n        letter 'x', because it would be hard to figure out, how many spaces are\r\n        produced exactly otherwise.\r\n\r\n        Table 7.2. Examples for the format argument\r\n\r\n        +-----------------------------------------------------------------------\r\n------+\r\n        |   Example   | Result for |                                            \r\n      |\r\n        |   string    | converting |                   Description              \r\n      |\r\n        |             |  1000*pi   |                                            \r\n      |\r\n        |-------------+------------+--------------------------------------------\r\n------|\r\n        |             |            |The '2' determines the minimum length of the\r\n      |\r\n        |%2.5f        |3141.59265  |output; but if needed (as in the example) th\r\ne     |\r\n        |             |            |output can be longer. The '5' is the number \r\nof    |\r\n        |             |            |digits after the decimal point.             \r\n      |\r\n        |-------------+------------+--------------------------------------------\r\n------|\r\n        |             |            |Two spaces (which appear as 'x') are added t\r\no pad |\r\n        |%12.5f       |xx3141.59265|the output to the requested length of 12    \r\n      |\r\n        |             |            |characters.                                 \r\n      |\r\n        |-------------+------------+--------------------------------------------\r\n------|\r\n        |             |            |The 'g' requests, that the precision ('5')  \r\n      |\r\n        |%012.5g      |0000003141.6|specifies the overall number of digits (befo\r\nre and|\r\n        |             |            |after the decimal point).                   \r\n      |\r\n        |-------------+------------+--------------------------------------------\r\n------|\r\n        |             |            |The '-' requests the output to be left-cente\r\nred   |\r\n        |%-12.5f      |3141.59265xx|(therefore the filling space appears at the \r\n      |\r\n        |             |            |right).                                     \r\n      |\r\n        |-------------+------------+--------------------------------------------\r\n------|\r\n        |             |            |Each '#' specifies a digit (either before or\r\n after|\r\n        |             |            |the dot), the '.' specifies the position of \r\nthe   |\r\n        |#####.##     |x3141.59    |dot. As 1000*pi does not have enough digits,\r\n the 5|\r\n        |             |            |requested digits before the dot are filled u\r\np with|\r\n        |             |            |a space (which shows up as an 'x').         \r\n      |\r\n        |-------------+------------+--------------------------------------------\r\n------|\r\n        |##,###.##    |x3,141.59   |Nearly the same as above, but the colon from\r\n the  |\r\n        |             |            |format shows up within the result.          \r\n      |\r\n        |-------------+------------+--------------------------------------------\r\n------|\r\n        |##,###.## and|            |                                            \r\n      |\r\n        |an additional|x3.141,59   |Similar to the example above, but colon and \r\ndot   |\r\n        |argument of  |            |are replaced with dot and colon respectively\r\n.     |\r\n        |\".,\"         |            |                                            \r\n      |\r\n        |-------------+------------+--------------------------------------------\r\n------|\r\n        |##,###.## and|            |Similar to the example above, but colon and \r\ndot   |\r\n        |an additional|x3_141,59   |are replaced with underscore and colon      \r\n      |\r\n        |argument of  |            |respectively.                               \r\n      |\r\n        |\"_,\"         |            |                                            \r\n      |\r\n        |-------------+------------+--------------------------------------------\r\n------|\r\n        |             |            |The format string does not contain a dot, an\r\nd     |\r\n        |#####        |x3142       |therefore the result does not have any fract\r\nional |\r\n        |             |            |digits.                                     \r\n      |\r\n        |-------------+------------+--------------------------------------------\r\n------|\r\n        |             |            |As 1000*pi has 4 digits in front of the deci\r\nmal   |\r\n        |##.###       |##.###      |dot and the format only specifies 2, yabasic\r\n does |\r\n        |             |            |not know what to do; therefore it chooses ju\r\nst to |\r\n        |             |            |reproduce the format string.                \r\n      |\r\n        +-----------------------------------------------------------------------\r\n------+\r\n\r\n        Example\r\n\r\n        do\r\n          input \"Please enter a format string: \" f$\r\n          a$=str$(1000*pi,f$)\r\n          for a=1 to len(a$)\r\n            if (mid$(a$,a,1)=\" \") mid$(a$,a,1)=\"x\"\r\n          next a\r\n          print a$\r\n        loop\r\n\r\n        This is the program, that has been used to get the results shown in the \r\ntable\r\n        above.\r\n\r\n        See also\r\n\r\n        print, using\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        sub ? declare a user defined subroutine\r\n\r\n        Synopsis\r\n\r\n        foo(2,\"hello\")\r\n\r\n        ?\r\n\r\n        sub foo(bar,baz$)\r\n          ?\r\n          return qux\r\n          ?\r\n        end sub\r\n\r\n        Description\r\n\r\n        The sub-keyword starts the definition of a user defined subroutine. With\r\n user\r\n        defined subroutines you are able to somewhat extend yabasic with your ow\r\nn\r\n        commands or functions. A subroutine accepts arguments (numbers or string\r\ns) and\r\n        returns a number or a string (however, you are not required to assign th\r\ne value\r\n        returned to a variable).\r\n\r\n        The name of the subroutine follows after the keyword sub. If the name (i\r\nn the\r\n        synopsis: foo) ends on a '$', the subroutine should return a string (wit\r\nh the\r\n        return-statement), otherwise a number.\r\n\r\n        After the name of the subroutine yabasic requires a pair of braces; with\r\nin\r\n        those braces you may specify a list of parameters, for which values can \r\n(but\r\n        need not) be included when calling the subroutine. If you omit one of th\r\nose\r\n        parameters when calling such a subroutine, it assumes the value zero (fo\r\nr\r\n        numeric parameters) or the empty string (for string-parameters). However\r\n from\r\n        the special variable numparams you may find out, how many arguments have\r\n really\r\n        been passed when calling the subroutine.\r\n\r\n        Parameters of a subroutine are always local variables (see the keyword l\r\nocal\r\n        for more explanation).\r\n\r\n        From within the subroutine you may return any time with the keyword retu\r\nrn;\r\n        along with the return-keyword you may specify the return value. Note tha\r\nt more\r\n        than one return is allowed within a single subroutine.\r\n\r\n        Finally, the keyword end sub ends the subroutine definition. Note, that \r\nthe\r\n        definition of a subroutine need not appear within the program before the\r\n first\r\n        call to this sub.\r\n\r\n        Note\r\n\r\n        As braces have two uses in yabasic (i.e. for supplying arguments to a\r\n        subroutine as well as to list the indices of an array). yabasic can not \r\ntell\r\n        apart an array from a subroutine with the same name. Therefore you canno\r\nt\r\n        define a subroutine with the same name as an array !\r\n\r\n        Example\r\n\r\n        p=2\r\n        do\r\n          if (is_prime(p)) print p\r\n          p=p+1\r\n        loop\r\n\r\n        sub is_prime(a)\r\n          local b\r\n          for b=2 to sqrt(a)\r\n            if (frac(a\/b)=0) return false\r\n          next b\r\n          return true\r\n        end sub\r\n\r\n        This example is not the recommended way to compute prime numbers. Howeve\r\nr it\r\n        gives a nice demonstration of using a subroutine.\r\n\r\n        See also\r\n\r\n        local, static, peek\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        switch ? select one of many alternatives depending on a value\r\n\r\n        Synopsis\r\n\r\n        switch a\r\n          case 1\r\n          case 2\r\n          ?\r\n        end switch\r\n\r\n        ?\r\n\r\n        switch a$\r\n          case \"a\"\r\n          case \"b\"\r\n        end switch\r\n\r\n        Description\r\n\r\n        The switch-statement selects one of many codepaths depending on a numeri\r\ncal or\r\n        string expression. I.e. it takes an expression (either numeric or string\r\n) and\r\n        compares it with a series of values, each wrapped within a case-clause. \r\nIf the\r\n        expression equals the value given in a case-clause, the subsequent state\r\nments\r\n        are executed.\r\n\r\n        The default-clause allows one to specify commands, which should be execu\r\nted, if\r\n        none of case-clauses matches.\r\n\r\n        Note, that many case-clauses might be clustered (e.g. case \"a\":case \"b\":\r\ncase\r\n        \"c\"). Or put another way: You need a break-statement at the end of a\r\n        case-branch, if you do not want to run into the next case.\r\n\r\n        Example\r\n\r\n        input \"Please enter a single digit: \" n\r\n        switch n\r\n          case 0:print \"zero\":break\r\n          case 1:print \"one\":break\r\n          case 2:print \"two\":break\r\n          case 3:print \"three\":break\r\n          case 4:print \"four\":break\r\n          case 5:case 6: case 7:case 8:case 9\r\n            print \"Much !\":break\r\n          default:print \"Hey ! That was more than a single digit !\"\r\n        end switch\r\n\r\n        This example translates a single digit into a string; note, how the case\r\ns 5 to\r\n        7 are clustered.\r\n\r\n        See also\r\n\r\n        switch, case, break\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        system() ? hand a statement over to your operating system and return its\r\n        exitcode\r\n\r\n        Synopsis\r\n\r\n        ret=system(\"foo\")\r\n        system(\"bar\")\r\n\r\n        Description\r\n\r\n        The system-command accepts a single string argument, which specifies a c\r\nommand\r\n        to be executed. The function will return the exitcode of the command; it\r\ns\r\n        output (if any) will be lost.\r\n\r\n        Example\r\n\r\n        print \"Please enter the name of the file, that should be deleted.\"\r\n        input f$\r\n        if (system(\"rm \"+f$+\" &gt;\/dev\/null 2&gt;&amp;1\")) then\r\n          print \"Error !\"\r\n        else\r\n          print \"okay.\"\r\n        endif\r\n\r\n        This program is Unix-specific: It uses the Unix-command rm to remove a f\r\nile.\r\n\r\n        See also\r\n\r\n        system$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        system$() ? hand a statement over to your operating system and return it\r\ns\r\n        output\r\n\r\n        Synopsis\r\n\r\n        print system$(\"dir\")\r\n\r\n        Description\r\n\r\n        The system$-command accepts a single string argument, specifying a comma\r\nnd,\r\n        that can be found and executed by your operating system. It returns the \r\noutput\r\n        of this command as one big string.\r\n\r\n        Example\r\n\r\n        input \"Please enter the name of a directory: \" d$\r\n        print\r\n        print \"This is the contents of the '\"+d$+\"':\"\r\n        print system$(\"dir \"+d$)\r\n\r\n        This example lists the contents of a directory, employing the dir-comman\r\nd\r\n        (which is about the only program, that is known under Unix as well as Wi\r\nndows).\r\n\r\n        See also\r\n\r\n        system, chomp\r\n\r\n        T\r\n\r\n        tan() ? return the tangent of its argument\r\n        tell ? get the current position within an open file\r\n        text ? write text into your graphic-window\r\n        then ? tell the long from the short form of the if-statement\r\n        time$ ? return a string containing the current time\r\n        to ? this keyword appears as part of other statements\r\n        token() ? split a string into multiple strings\r\n        triangle ? draw a triangle\r\n        trim$() ? remove leading and trailing spaces from its argument\r\n        true ? a constant with the value of 1\r\n\r\n        Name\r\n\r\n        tan() ? return the tangent of its argument\r\n\r\n        Synopsis\r\n\r\n        foo=tan(bar)\r\n\r\n        Description\r\n\r\n        The tan-function computes the tangent of its arguments (which should be\r\n        specified in radians).\r\n\r\n        Example\r\n\r\n        for a=0 to 45\r\n          print tan(a*pi\/180)\r\n        next a\r\n\r\n        This example simply prints the tangent of all angles between 0 and 45 de\r\ngrees.\r\n\r\n        See also\r\n\r\n        atan, sin\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        tell ? get the current position within an open file\r\n\r\n        Synopsis\r\n\r\n        open #1,\"foo\"\r\n          ?\r\n        position=tell(#1)\r\n\r\n        Description\r\n\r\n        The tell-function requires the number of an open file as an argument. It\r\n        returns the position (counted in bytes, starting from the beginning of t\r\nhe\r\n        file) where the next read will start.\r\n\r\n        Example\r\n\r\n        open #1,\"foo\",\"w\"\r\n        print #1 \"Hello World !\"\r\n        close #1\r\n\r\n        open #1,\"foo\"\r\n        seek #1,0,\"end\"\r\n        print tell(#1)\r\n        close 1\r\n\r\n        This example (mis)uses tell to get the size of the file. The seek positi\r\nons the\r\n        file pointer at the end of the file, therefore the call to tell returns \r\nthe\r\n        total length of the file.\r\n\r\n        See also\r\n\r\n        tell, open\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        text ? write text into your graphic-window\r\n\r\n        Synopsis\r\n\r\n        text x,y,\"foo\"\r\n        text x,y,\"foo\",\"lb\"\r\n        text x,y,\"foo\",\"cc\",\"font\"\r\n        text x,y,\"foo\",\"font\",\"rt\"\r\n\r\n        Description\r\n\r\n        The text-commands displays a text-string (the third argument) at the giv\r\nen\r\n        position (the first two arguments) within an already opened window. The \r\nfont to\r\n        be used can be optionally specified as either the fourth or fifth argume\r\nnt\r\n        (\"font\" in the example above). A font specified this way will also be us\r\ned for\r\n        any subsequent text-commands, as long as they do not specify a font them\r\nselves.\r\n\r\n        The fourth or fifth optional argument (\"lb\" in the example above) can be\r\n used\r\n        to specify the alignment of the text with respect to the specified posit\r\nion.\r\n        This argument is always two characters long: The first character specifi\r\nes the\r\n        horizontal alignment and can be either l, r or c, which stand for left, \r\nright\r\n        or center. The second character specifies the vertical alignment and can\r\n be one\r\n        of t, b or c, which stand for top, bottom or center respectively. If you\r\n omit\r\n        this alignment argument, the default \"lb\" applies; however this default \r\nmay be\r\n        changed with poke \"textalign\",\"xx\"\r\n\r\n        Example\r\n\r\n        open window 500,200\r\n        clear screen\r\n        data \"lt\",\"lc\",\"lb\",\"ct\",\"cc\",\"cb\",\"rt\",\"rc\",\"rb\"\r\n        for a=1 to 9\r\n          read align$\r\n          print \"Alignment: \",align$\r\n          line 50*a-15,100,50*a+15,100\r\n          line 50*a,85,50*a,115\r\n          text 50*a,100,\"Test\",align$\r\n          inkey$\r\n        next a\r\n\r\n        This program draws nine crosses and writes the same text at each; howeve\r\nr it\r\n        goes through all possible nine alignment strings, showing their effect.\r\n\r\n        See also\r\n\r\n        open window, peek, poke\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        then ? tell the long from the short form of the if-statement\r\n\r\n        Synopsis\r\n\r\n        if (a&lt;b) then\r\n          ?\r\n        endif\r\n\r\n        Description\r\n\r\n        The keyword then is part of the if-statement; please see there for furth\r\ner\r\n        explanations. However, not every if-statement requires the keyword then:\r\n If the\r\n        keyword then is present, the if-clause may extend over more than one lin\r\ne, and\r\n        the keyword endif is required to end it. If the keyword then is not pres\r\nent,\r\n        the if-statement extends up to the end of the line, and any endif would \r\nbe an\r\n        error.\r\n\r\n        Example\r\n\r\n        if (1&lt;2) then\r\n          print \"Hello \";\r\n        endif\r\n\r\n        if (2&lt;3) print \"world\"\r\n        if (2&lt;1)\r\n          print \"!\"\r\n\r\n        This example prints Hello world. Note, that no exclamation mark (!) is p\r\nrinted,\r\n        which might come as a surprise and may be changed in future versions of \r\nyabasic\r\n        .\r\n\r\n        See also\r\n\r\n        if\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        time$ ? return a string containing the current time\r\n\r\n        Synopsis\r\n\r\n        print time$\r\n        print time$()\r\n\r\n        Description\r\n\r\n        The time$ function returns the current time in four fields separated by \r\nhyphens\r\n        '-'. The fields are:\r\n\r\n          * The current hour in the range from 0 to 23, padded with zeroes (e.g.\r\n 00 or\r\n            04) to a length of two characters.\r\n\r\n          * The number of minutes, padded with zeroes.\r\n\r\n          * The number of seconds, padded with zeroes.\r\n\r\n          * The number of seconds, that have elapsed since the program has been\r\n            started. This value increases as long as your program runs and is th\r\nerefore\r\n            unbound and not padded with zeroes.\r\n\r\n        At the time of writing this documentation, time$ returns 22-58-53-0. Not\r\ne, that\r\n        the first three of the four fields returned by time$ have a fixed width;\r\n        therefore it is easy to extract some fields with the usual string-functi\r\nons\r\n        mid$ (and others).\r\n\r\n        Example\r\n\r\n        print \"Hello it is \",time$\r\n        print \"An empty for-loop with ten million iterations takes \";\r\n        for a=1 to 10000000:next a\r\n        print \"Now it is \",time$\r\n        print peek(\"secondsrunning\"),\" seconds have passed.\"\r\n\r\n        This program benchmarks the for-loop; however, it does not use the fourt\r\nh field\r\n        of the string returned by time$, because that string wraps around every \r\n60\r\n        seconds; rather the peek \"secondsrunning\" is queried.\r\n\r\n        See also\r\n\r\n        date\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        to ? this keyword appears as part of other statements\r\n\r\n        Synopsis\r\n\r\n        for a=1 to 100 step 2\r\n          ?\r\n        next a\r\n\r\n        line x,y to a,b\r\n\r\n        Description\r\n\r\n        The to-keyword serves two purposes (which are not related at all):\r\n\r\n          * within for-statements, to specify the upper bound of the loop.\r\n\r\n          * Within any graphical command (e.g. line), that requires two points (\r\ni.e.\r\n            four numbers) as arguments, a comma ',' might be replaced with the k\r\neyword\r\n            to. I.e. instead of 100,100,200,200 you may write 100,100 to 200,200\r\n in\r\n            such commands.\r\n\r\n        Example\r\n\r\n        Please see the command listed under \"See also\" for examples.\r\n\r\n        See also\r\n\r\n        for, line, rectangle\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        token() ? split a string into multiple strings\r\n\r\n        Synopsis\r\n\r\n        dim w$(10)\r\n        ?\r\n        num=token(a$,w$())\r\n        num=token(a$,w$(),s$)\r\n\r\n        Description\r\n\r\n        The token-function accepts a string (containing the text to be split), a\r\n        reference to a string-array (which will receive the resulting strings, i\r\n.e. the\r\n        tokens) and an optional string (with a set of characters, at which to sp\r\nlit,\r\n        i.e. the delimiters).\r\n\r\n        The token-function regards its first argument as a list of tokens separa\r\nted by\r\n        delimiters and it will store the list of tokens within the array-referen\r\nce that\r\n        has been supplied. Note, that the array, which is passed as a reference \r\n(w$()\r\n        in the synopsis), will be resized accordingly, so that you don't have to\r\n figure\r\n        out the number of tokens in advance. The element at position zero (i.e. \r\nw$(0))\r\n        will not be used.\r\n\r\n        Normally (i.e. if you omit the third, the delimiter-argument) the functi\r\non will\r\n        regard space or tab as delimiters for tokens; however by supplying a thi\r\nrd\r\n        argument, you may split at any single of the characters within this stri\r\nng.\r\n        E.g. if you supply \":;\" as the third argument, then colon (:) or semicol\r\non (;)\r\n        will delimit tokens.\r\n\r\n        Note, that token will never produce empty tokens, even if two or more\r\n        separators follow in sequence. Refer to the closely related split-functi\r\non, if\r\n        you do not like this behaviour. In some way, the token-function focuses \r\non the\r\n        tokens and not on the separators (other than the split-function, which f\r\nocuses\r\n        on the separators).\r\n\r\n        The second argument is a reference on a string-array, where the tokens w\r\nill be\r\n        stored; this array will be expanded (or shrunk) as necessary to have roo\r\nm for\r\n        all tokens.\r\n\r\n        The first argument finally contains the text, that will be split into to\r\nkens.\r\n        The token-function returns the number of tokens, that have been found.\r\n\r\n        Please see the examples below for some hints on the exact behaviour of t\r\nhe\r\n        token-function and how it differs from the split-function:\r\n\r\n        Example\r\n\r\n        print \"This program will help you to understand, how the\"\r\n        print \"token()-function exactly works and how it behaves\"\r\n        print \"in certain special cases.\"\r\n        print\r\n        print \"Please enter a line containing tokens separated\"\r\n        print \"by either '=' or '-'\"\r\n        dim t$(10)\r\n        do\r\n          print\r\n          input \"Please enter a line: \" l$\r\n          num=token(l$,t$(),\"=-\")\r\n          print num,\" Tokens: \";\r\n          for a=1 to num\r\n            if (t$(a)=\"\") then\r\n              print \"(EMPTY)\";\r\n            else\r\n              print t$(a);\r\n            endif\r\n            if (a&lt;num) print \",\";\r\n          next a\r\n          print\r\n        loop\r\n\r\n        This program prints the following output:\r\n\r\n        Please enter a line: a\r\n        1 Tokens: a\r\n\r\n        Please enter a line:\r\n        0 Tokens:\r\n\r\n        Please enter a line: ab\r\n        1 Tokens: ab\r\n\r\n        Please enter a line: a=b\r\n        2 Tokens: a,b\r\n\r\n        Please enter a line: a-\r\n        1 Tokens: a\r\n\r\n        Please enter a line: a-=\r\n        1 Tokens: a\r\n\r\n        Please enter a line: =a-\r\n        1 Tokens: a\r\n\r\n        Please enter a line: a=-b\r\n        2 Tokens: a,b\r\n\r\n        Please enter a line: a--b-\r\n        2 Tokens: a,b\r\n\r\n        Please enter a line: -a==b-c==\r\n        3 Tokens: a,b,c\r\n\r\n        See also\r\n\r\n        split\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        triangle ? draw a triangle\r\n\r\n        Synopsis\r\n\r\n        open window 100,100\r\n        triangle 100,100,50,50,100,50\r\n        fill triangle 50,100,100,50,200,200\r\n        clear fill triangle 20,20,10,10,200,200\r\n\r\n        Description\r\n\r\n        The triangle-command draws a triangle; it requires 6 parameters: The x- \r\nand\r\n        y-coordinates of the three points making up the triangle. With the optio\r\nnal\r\n        keywords clear and fill (which may appear both and in any sequence) the\r\n        triangle can be cleared and filled respectively.\r\n\r\n        Example\r\n\r\n        open window 200,200\r\n        do\r\n          phi=phi+0.2\r\n          i=i+2\r\n          color mod(i,255),mod(85+2*i,255),mod(170+3*i,255)\r\n          dx=100*sin(phi):dy=20*cos(phi)\r\n          fill triangle 100+20*sin(phi),100+20*cos(phi),100-20*sin(phi),100-20*c\r\nos(phi),100-80*cos(phi),100+80*sin(phi)\r\n          sleep 0.1\r\n        loop\r\n\r\n        This example draws a colored triangles until you get exhausted.\r\n\r\n        See also\r\n\r\n        open window, open printer, line, circle, rectangle\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        trim$() ? remove leading and trailing spaces from its argument\r\n\r\n        Synopsis\r\n\r\n        a$=trim$(b$)\r\n\r\n        Description\r\n\r\n        The trim$-function removes all whitespace from the left and from the rig\r\nht end\r\n        of a string and returns the result. Calling trim$ is equivalent to calli\r\nng\r\n        rtrim$(ltrim$()).\r\n\r\n        Example\r\n\r\n        do\r\n          input \"Continue ? Please answer yes or no: \" a$\r\n          a$=lower$(trim$(a$))\r\n          if (len(a$)&gt;0 and a$=left$(\"no\",len(a$)) exit\r\n        loop\r\n\r\n        This example asks for an answer (yes or no) and removes spaces with trim\r\n$ to\r\n        make the comparison with the string \"no\" more bulletproof.\r\n\r\n        See also\r\n\r\n        ltrim$, rtrim$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        true ? a constant with the value of 1\r\n\r\n        Synopsis\r\n\r\n        okay=true\r\n\r\n        Description\r\n\r\n        The constant true can be assigned to variables which will later appear i\r\nn\r\n        conditions (e.g. an if-statement.\r\n\r\n        true may also be written as TRUE or even TrUe.\r\n\r\n        Example\r\n\r\n        input \"Please enter a string of all upper letters: \" a$\r\n        if (is_upper(a$)) print \"Okay\"\r\n\r\n        sub is_upper(a$)\r\n          if (a$=upper$(a$)) return true\r\n          return false\r\n        end sub\r\n\r\n        See also\r\n\r\n        false\r\n\r\n        U\r\n\r\n        until ? end a repeat-loop\r\n        upper$() ? convert a string to upper case\r\n        using ? Specify the format for printing a number\r\n\r\n        Name\r\n\r\n        until ? end a repeat-loop\r\n\r\n        Synopsis\r\n\r\n        repeat\r\n          ?\r\n        until (?)\r\n\r\n        Description\r\n\r\n        The until-keyword ends a loop, which has been introduced by the repeat-k\r\neyword.\r\n        until requires a condition in braces (or an expression, see here for det\r\nails)\r\n        as an argument; the loop will continue until this condition evaluates to\r\n true.\r\n\r\n        Example\r\n\r\n        c=1\r\n        s=1\r\n        repeat\r\n          l=c\r\n          s=-(s+sig(s))\r\n          c=c+1\/s\r\n          print c\r\n        until(abs(l-c)&lt;0.000001)\r\n\r\n        This program calculates the sequence 1\/1-1\/2+1\/3-1\/4+1\/5-1\/6+1\/7-1\/8+ ? \r\n;\r\n        please let me know, if you know against which value this converges.\r\n\r\n        See also\r\n\r\n        repeat\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        upper$() ? convert a string to upper case\r\n\r\n        Synopsis\r\n\r\n        u$=upper$(a$)\r\n\r\n        Description\r\n\r\n        The upper$-function accepts a single string argument and converts it to \r\nall\r\n        upper case.\r\n\r\n        Example\r\n\r\n        line input \"Please enter a sentence without the letter 'e': \" l$\r\n        p=instr(upper$(l$),\"E\")\r\n        if (p) then\r\n          l$=lower$(l$)\r\n          mid$(l$,p,1)=\"E\"\r\n          print \"Hey, you are wrong, see here!\"\r\n          print l$\r\n        else\r\n          print \"Thanks.\"\r\n        endif\r\n\r\n        This program asks for a sentence and marks the first (if any) occurrence\r\n of the\r\n        letter 'e' by converting it to upper case (in contrast to the rest of th\r\ne\r\n        sentence, which is converted to lower case).\r\n\r\n        See also\r\n\r\n        lower$\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        using ? Specify the format for printing a number\r\n\r\n        Synopsis\r\n\r\n        print a using \"##.###\"\r\n        print a using(\"##.###\",\",.\")\r\n\r\n        Description\r\n\r\n        The using-keyword may appear as part of the print-statement and specifie\r\ns the\r\n        format (e.g. the number of digits before and after the decimal dot), whi\r\nch\r\n        should be used to print the number.\r\n\r\n        The possible values for the format argument (\"##.###\" in the synopsis ab\r\nove)\r\n        are described within the entry for the str$-function; especially the sec\r\nond\r\n        line in the synopsis (print a using(\"##.###\",\",.\")) will become clear af\r\nter\r\n        referring to str$. In fact the using clause is closely related to the\r\n        str$-function; the former can always be rewritten using the latter; i.e.\r\n print\r\n        foo using bar$ is always equivalent to print str$(foo,bar$). Therefore y\r\nou\r\n        should check out str$ to learn more.\r\n\r\n        Example\r\n\r\n        for a=1 to 10\r\n          print sqrt(ran(10000*a)) using \"#########.#####\"\r\n        next a\r\n\r\n        This example prints a column of square roots of random number, nicely al\r\nigned\r\n        at the decimal dot.\r\n\r\n        See also\r\n\r\n        print, str$\r\n\r\n        V\r\n\r\n        val() ? converts a string to a number\r\n\r\n        Name\r\n\r\n        val() ? converts a string to a number\r\n\r\n        Synopsis\r\n\r\n        x=val(x$)\r\n\r\n        Description\r\n\r\n        The val-function checks, if the start of its string argument forms a flo\r\nating\r\n        point number and then returns this number. The string therefore has to s\r\ntart\r\n        with digits (only whitespace in front is allowed), otherwise the val-fun\r\nction\r\n        returns zero.\r\n\r\n        Example\r\n\r\n        input \"Please enter a length, either in inches (in) or centimeters (cm) \r\n\" l$\r\n        if (right$(l$,2)=\"in\") then\r\n          l=val(l$)*2.51\r\n        else\r\n          l=val(l$)\r\n        print \"You have entered \",l,\"cm.\"\r\n\r\n        This example queries for a length and checks, if it has been specified i\r\nn\r\n        inches or centimeters. The length is then converted to centimeters.\r\n\r\n        See also\r\n\r\n        str$\r\n\r\n        W\r\n\r\n        wait ? pause, sleep, wait for the specified number of seconds\r\n        wend ? end a while-loop\r\n        while ? start a while-loop\r\n        window origin ? move the origin of a window\r\n\r\n        Name\r\n\r\n        wait ? pause, sleep, wait for the specified number of seconds\r\n\r\n        Synopsis\r\n\r\n        wait 4\r\n\r\n        Description\r\n\r\n        The wait-command has many different names: You may write pause, sleep or\r\n wait\r\n        interchangeably; whatever you write, yabasic will always do exactly the \r\nsame.\r\n\r\n        Therefore you should refer to the entry for the pause-function for furth\r\ner\r\n        information.\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        wend ? end a while-loop\r\n\r\n        Synopsis\r\n\r\n        while(a&lt;b)\r\n          ?\r\n        wend\r\n\r\n        Description\r\n\r\n        The wend-keyword marks the end of a while-loop. Please see the while-key\r\nword\r\n        for more details.\r\n\r\n        wend can be written as end while or even end-while.\r\n\r\n        Example\r\n\r\n        line input \"Please enter a sentence: \" a$\r\n        p=instr(a$,\"e\")\r\n        while(p)\r\n          mid$(a$,p,1)=\"E\"\r\n          p=instr(a$,\"e\")\r\n        wend\r\n        print a$\r\n\r\n        This example reads a sentence and converts every occurrence of the lette\r\nr e\r\n        into uppercase (E).\r\n\r\n        See also\r\n\r\n        while (which is just the following entry).\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        while ? start a while-loop\r\n\r\n        Synopsis\r\n\r\n        while(?)\r\n          ?\r\n        wend\r\n\r\n        Description\r\n\r\n        The while-keyword starts a while-loop, i.e. a loop that is executed as l\r\nong as\r\n        the condition (which is specified in braces after the keyword while) eva\r\nluates\r\n        to true.\r\n\r\n        Note, that the body of such a while-loop will not be executed at all, if\r\n the\r\n        condition following the while-keyword is not true initially.\r\n\r\n        If you want to leave the loop prematurely, you may use the break-stateme\r\nnt.\r\n\r\n        Example\r\n\r\n        open #1,\"foo\"\r\n        while(!eof(1))\r\n          line input #1 a$\r\n          print a$\r\n        wend\r\n\r\n        This program reads the file foo and prints it line by line.\r\n\r\n        See also\r\n\r\n        until, break, wend, do\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        origin ? move the origin of a window\r\n\r\n        Synopsis\r\n\r\n        open window 200,200\r\n        origin \"cc\"\r\n\r\n        Description\r\n\r\n        The origin-command applies to graphic windows and moves the origin of th\r\ne\r\n        coordinate system to one of nine point within the window. The normal pos\r\nition\r\n        of the origin is in the upper left corner of the window; however in some\r\n cases\r\n        this is inconvenient and moving the origin may save you from subtracting\r\n a\r\n        constant offset from all of your coordinates.\r\n\r\n        However, you may not move the origin to an arbitrary position; in horizo\r\nntal\r\n        position there are only three positions: left, center and right, which a\r\nre\r\n        decoded by the letters l, c and r. In vertical position the allowed posi\r\ntions\r\n        are top, center and bottom; encoded by the letters t, c and b. Taking th\r\ne\r\n        letters together, you arrive at a string, which might be passed as an ar\r\ngument\r\n        to the command; e.g. \"cc\" or \"rt\".\r\n\r\n        Example\r\n\r\n        100,100\r\n\r\n        open window 200,200\r\n        window origin \"cc\"\r\n        circle 0,0,60\r\n\r\n        This example draws a circle, centered at the center of the window.\r\n\r\n        See also\r\n\r\n        open window\r\n\r\n        X\r\n\r\n        xor() ? compute the exclusive or\r\n\r\n        Name\r\n\r\n        xor() ? compute the exclusive or\r\n\r\n        Synopsis\r\n\r\n        x=xor(a,b)\r\n\r\n        Description\r\n\r\n        The xor computes the bitwise exclusive or of its two numeric arguments. \r\nTo\r\n        understand the result, both arguments should be viewed as binary numbers\r\n (i.e.\r\n        a series of 0 and 1); a bit of the result will then be 1, if exactly one\r\n        argument has a 1 and the other has a 0 at this position in their binary\r\n        representation.\r\n\r\n        Note, that both arguments are silently converted to integer values and t\r\nhat\r\n        negative numbers have their own binary representation and may lead to\r\n        unexpected results when passed to and.\r\n\r\n        Example\r\n\r\n        print xor(7,4)\r\n\r\n        This will print 3. This result is obvious, if you note, that the binary\r\n        representation of 7 and 4 are 111 and 100 respectively; this will yield \r\n011 in\r\n        binary representation or 2 as decimal.\r\n\r\n        The eor-function is the same as the xor function; both are synonymous; h\r\nowever\r\n        they have each their own description, so you may check out the entry of \r\neor for\r\n        a slightly different view.\r\n\r\n        See also\r\n\r\n        and, or, eor, not\r\n\r\n        Special characters\r\n\r\n        # ? either a comment or a marker for a file-number\r\n        \/\/ ? starts a comment\r\n        @ ? synonymous to at\r\n        : ? separate commands from each other\r\n        ; ? suppress the implicit newline after a print-statement\r\n        ** or ^ ? raise its first argument to the power of its second\r\n\r\n        Name\r\n\r\n        # ? either a comment or a marker for a file-number\r\n\r\n        Synopsis\r\n\r\n        # This is a comment, but the line below not !\r\n        open #1,\"foo\"\r\n\r\n        Description\r\n\r\n        The hash ('#') has two totally unrelated uses:\r\n\r\n          * A hash might appear in commands related with file-io. yabasic uses s\r\nimple\r\n            numbers to refer to open files (within input, print, peek or eof). I\r\nn those\r\n            commands the hash may precede the number, which species the file. Pl\r\nease\r\n            see those commands for further information and examples; the rest of\r\n this\r\n            entry is about the second use (as a comment).\r\n\r\n          * As the very first character within a line, a hash introduces comment\r\ns\r\n            (similar to rem).\r\n\r\n        '#' as a comment is common in most scripting languages and has a special\r\n use\r\n        under Unix: If the very first line of any Unix-program begins with the\r\n        character sequence '#!' (\"she-bang\", no spaces allowed), the rest of the\r\n line\r\n        is taken as the program that should be used to execute the script. I.e. \r\nif your\r\n        yabasic-program starts with '#!\/usr\/local\/bin\/yabasic', the program \/usr\r\n\/local\/\r\n        bin\/yabasic will be invoked to execute the rest of the program. As a rem\r\nark for\r\n        windows-users: This mechanism ensures, that yabasic will be invoked to e\r\nxecute\r\n        your program; the ending of the file (e.g. .yab) will be ignored by Unix\r\n.\r\n\r\n        Example\r\n\r\n        # This line is a valid comment\r\n        print \"Hello \" : # But this is a syntax error, because\r\n        print \"World!\" : # the hash is not the first character !\r\n\r\n        Note, that this example will produce a syntax error and is not a valid p\r\nrogram\r\n        !\r\n\r\n        See also\r\n\r\n        input, print, peek or eof, \/\/, rem\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        \/\/ ? starts a comment\r\n\r\n        Synopsis\r\n\r\n        \/\/  This is a comment !\r\n\r\n        Description\r\n\r\n        The double-slash ('\/\/') is (besides REM and '#') the third way to start \r\na\r\n        comment. '\/\/' is the latest and greatest in the field of commenting and \r\nallows\r\n        yabasic to catch up with such cool languages like C++ and Java.\r\n\r\n        Example\r\n\r\n        \/\/ Another comment.\r\n        print \"Hello world !\" \/\/ Another comment\r\n\r\n        Unlike the example given for '#' this example is syntactically correct a\r\nnd will\r\n        not produce an error.\r\n\r\n        See also\r\n\r\n        #, rem\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        @ ? synonymous to at\r\n\r\n        Synopsis\r\n\r\n        clear screen\r\n        ?\r\n        print @(a,b)\r\n\r\n        Description\r\n\r\n        As '@' is simply a synonym for at, please see at for further information\r\n.\r\n\r\n        See also\r\n\r\n        at\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        : ? separate commands from each other\r\n\r\n        Synopsis\r\n\r\n        print \"Hello \":print \"World\"\r\n\r\n        Description\r\n\r\n        The colon (':') separates multiple commands on a single line.\r\n\r\n        The colon and the newline-character have mostly the same effect, only th\r\nat the\r\n        latter, well, starts a new line too. The only other difference is their \r\neffect\r\n        within the (so-called) short if, which is an if-statement without the ke\r\nyword\r\n        then. Please see the entry for if for more details.\r\n\r\n        Example\r\n\r\n        if (a&lt;10) print \"Hello \":print \"World !\"\r\n\r\n        This example demonstrates the difference between colon and newline as de\r\nscribed\r\n        above.\r\n\r\n        See also\r\n\r\n        if\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        ; ? suppress the implicit newline after a print-statement\r\n\r\n        Synopsis\r\n\r\n        print \"foo\",bar;\r\n\r\n        Description\r\n\r\n        The semicolon (';') may only appear at the last position within a print\r\n        -statement. It suppresses the implicit newline, which yabasic normally a\r\ndds\r\n        after each print-statement.\r\n\r\n        Put another way: Normally the output of each print-statement appears on \r\na line\r\n        by itself. If you rather want the output of many print-statements to app\r\near on\r\n        a single line, you should end the print-statement with a semicolon.\r\n\r\n        Example\r\n\r\n        print \"Hello \";:print \"World !\"\r\n\r\n        This example prints Hello World ! in a single line.\r\n\r\n        See also\r\n\r\n        print\r\n\r\n        ------------------------------------------------------------------------\r\n-------\r\n\r\n        Name\r\n\r\n        ** or ^ ? raise its first argument to the power of its second\r\n\r\n        Synopsis\r\n\r\n        print 2**b\r\n        print 3^4\r\n\r\n        Description\r\n\r\n        ** (or ^, which is an exact synonym), is the arithmetic operator of\r\n        exponentiation; it requires one number to its left and a second one to i\r\nts\r\n        right; ** then raises the first argument to the power of the second and \r\nreturns\r\n        the result. The result will only be computed if it yields a real number \r\n(as\r\n        opposed to a complex number); this means, that the power can not be comp\r\nuted,\r\n        if the first argument is negative and the second one is fractional. On t\r\nhe\r\n        other hand, the second argument can be fractional, if the first one ist\r\n        positive; this means, that ** may be used to compute arbitrary roots: e.\r\ng.\r\n        x**0.5 computes the square root of x.\r\n\r\n        Example\r\n\r\n        print 2**0.5\r\n\r\n        See also\r\n\r\n        sqrt\r\n\r\n        Reserved Words\r\n\r\n        Here is a list of all reserved words in yabasic. Please make sure, that \r\nyou do\r\n        not try to use one of them as the name of a variable or subroutine. Or, \r\nthe\r\n        other way around: If you get some mysterious error from yabasic and you \r\njust\r\n        can't figure out why, then you might be using one of the reserved words \r\nbelow,\r\n        without knowing.\r\n\r\n        Anyway, here is the list:\r\n\r\n        ABS       ACOS          AND      ARRAYDIM   ARRAYDIMENSION\r\n        ARRAYSIZE AS            ASC      ASIN       AT\r\n        ATAN      BEEP          BELL     BIN$       BIND\r\n        BITBLIT   BITBLIT$      BITBLT   BITBLT$    BOX\r\n        BREAK     CASE          CHR$     CIRCLE     CLEAR\r\n        CLOSE     COLOR         COLOUR   COMPILE    CONTINUE\r\n        COS       CURVE         DATA     DATE$      DEC\r\n        DEFAULT   DIM           DO       DOT        ELSE\r\n        ELSEIF    ELSIF         END      ENDIF      EOF\r\n        EOR       ERROR         EXECUTE  EXECUTE$   EXIT\r\n        EXP       EXPORT        FI       FILL       FILLED\r\n        FOR       FRAC          GETBIT$  GETSCREEN$ GLOB\r\n        GOSUB     GOTO          HEX$     IF         INKEY$\r\n        INPUT     INSTR         INT      INTERRUPT  LABEL\r\n        LEFT$     LEN           LET      LINE       LOCAL\r\n        LOG       LOOP          LOWER$   LTRIM$     MAX\r\n        MID$      MIN           MOD      MOUSEB     MOUSEBUTTON\r\n        MOUSEMOD  MOUSEMODIFIER MOUSEX   MOUSEY     NEW\r\n        NEXT      NOT           NUMPARAM ON         OPEN\r\n        OR        ORIGIN        PAUSE    PEEK       PEEK$\r\n        POKE      PRINT         PRINTER  PUTBIT     PUTSCREEN\r\n        RAN       READ          READING  RECT       RECTANGLE\r\n        REDIM     REPEAT        RESTORE  RETURN     REVERSE\r\n        RIGHT$    RINSTR        RTRIM$   SCREEN     SEEK\r\n        SIG       SIN           SLEEP    SPLIT      SPLIT$\r\n        SQR       SQRT          STATIC   STEP       STR$\r\n        SUB       SUBROUTINE    SWITCH   SYSTEM     SYSTEM$\r\n        TAN       TELL          TEXT     THEN       TIME$\r\n        TO        TOKEN         TOKEN$   TRIANGLE   TRIM$\r\n        UNTIL     UPPER$        USING    VAL        WAIT\r\n        WEND      WHILE         WINDOW   WRITING    XOR\r\n\r\n        Please see here for explanations on how to use these words in yabasic.\r\n\r\n        Chapter 8. Some general concepts and terms\r\n\r\n        Logical shortcuts\r\n        Conditions and expressions\r\n        References on arrays\r\n        Specifying Filenames under Windows\r\n        Escape-sequences\r\n        Creating a standalone program from your yabasic-program\r\n\r\n        This chapter presents some general concepts and terms, which deserve a\r\n        description on their own, but are not associated with a single command o\r\nr\r\n        function in yabasic. Most of these topics do not lend themselves to be r\r\nead\r\n        alone, rather they might be read (or skimmed) as background material if \r\nan\r\n        entry from the alphabetical list of commands refers to them.\r\n\r\n        Logical shortcuts\r\n\r\n        Logical shortcuts are no special language construct and there is no keyw\r\nord for\r\n        them; they are just a way to evaluate logical expressions. Logical expre\r\nssions\r\n        (i.e. a series of conditions or comparisons joined by and or or) are onl\r\ny\r\n        evaluated until the final result of the expression can be determined. An\r\n        example:\r\n\r\n        if (a&lt;&gt;0 and b\/a&gt;2) print \"b is at least twice as big as a\"\r\n\r\n        The logical expression a&lt;&gt;0 and b\/a&gt;2 consists of two comparisons, both \r\nof\r\n        which must be true, if the print statement should be executed. Now, if t\r\nhe\r\n        first comparison (a&lt;&gt;0) is false, the whole logical expression can never\r\n be\r\n        true and the second comparison (b\/a&gt;2) need not be evaluated.\r\n\r\n        This is exactly, how yabasic behaves: The evaluation of a composed logic\r\nal\r\n        expressions is terminated immediately, as soon as the final result can b\r\ne\r\n        deduced from the already evaluated parts.\r\n\r\n        In practice, this has the following consequences:\r\n\r\n          * If two or more comparisons are joined with and and one comparison re\r\nsults\r\n            in false, the logical expression is evaluated no further and the ove\r\nrall\r\n            result is false.\r\n\r\n          * If two or more comparisons are joined with or and one comparison res\r\nults in\r\n            true, the logical expression is evaluated no further and the result \r\nis\r\n            true.\r\n\r\n        ?Nice, but whats this good for ??, I hear you say. Well, just have anoth\r\ner look\r\n        at the example, especially the second comparison (b\/a&gt;2); dividing b by \r\na is\r\n        potentially hazardous: If a equals zero, the expression will cause an er\r\nror and\r\n        your program will terminate. To avoid this, the first part of the compar\r\nison (a\r\n        &lt;&gt;0) checks, if the second one can be evaluated without risk. This pre-c\r\nhecking\r\n        is the most common usage and primary motivation for logical shortcuts (a\r\nnd the\r\n        reason why most programming languages implement them).\r\n\r\n        Conditions and expressions\r\n\r\n        Well, bottomline there is no difference or distinction between condition\r\ns and\r\n        expressions, at least as yabasic is concerned. So you may assign the res\r\nult of\r\n        comparisons to variables or use an arithmetic expression or a simple var\r\niable\r\n        within a condition (e.g. within an if-statement). So the constructs show\r\nn in\r\n        the example below are all totally valid:\r\n\r\n        input \"Please enter a number between 1 and 10: \" a\r\n\r\n        rem   Assigning the result of a comparison to a variable\r\n        okay=a&gt;=1 and a&lt;=10\r\n\r\n        rem   Use a variable within an if-statement\r\n        if (not okay) error \"Wrong, wrong !\"\r\n\r\n        So conditions and expressions are really the same thing (at least as lon\r\ng as\r\n        yabasic is concerned). Therefore the terms conditions and expression can\r\n really\r\n        be used interchangeably, at least in theory. In reality the term conditi\r\non is\r\n        used in connection with if or while whereas the term expression tends to\r\n be\r\n        used more often within arithmetic context.\r\n\r\n        References on arrays\r\n\r\n        References on arrays are the only way to refer to an array as a whole an\r\nd to\r\n        pass it to subroutines or functions like arraydim or arraysize. Whereas \r\n(for\r\n        example) a(2) designates the second element of the array a, a() (with em\r\npty\r\n        braces) refers to the array a itself. a() is called an array reference.\r\n\r\n        If you pass an array reference to one of your own subroutines, you need \r\nto be\r\n        aware, that the subroutine will be able to modify the array you have pas\r\nsed in.\r\n        So passing an array reference does not create a copy of the array; this \r\nhas\r\n        some interesting consequences:\r\n\r\n          * Speed and space: Creating a copy of an array would be a time (and re\r\nsource)\r\n            consuming operation; passing just a reference is cheap and fast.\r\n\r\n          * Returning many values: A subroutine, that wants to give back more th\r\nan one\r\n            value, may require an array reference among its arguments and then s\r\ntore\r\n            its many return values within this array. This is the only way to re\r\nturn\r\n            more than one value from a subroutine.\r\n\r\n        Specifying Filenames under Windows\r\n\r\n        As you probably know, windows uses the character '\\' to separate the\r\n        directories within a pathname; an example would be C:\\yabasic\\yabasic.ex\r\ne (the\r\n        usual location of the yabasic executable). However, the very same charac\r\nter '\\'\r\n        is used to construct escape sequences, not only in yabasic but in most o\r\nther\r\n        programming languages.\r\n\r\n        Therefore the string \"C:\\t.dat\" does not specify the file t.dat within t\r\nhe\r\n        directory C:; this is because the sequence '\\t' is translated into the\r\n        tab-character. To specify this filename, you need to use the string \"C:\\\r\n\\t.dat\"\r\n        (note the double slash '\\\\').\r\n\r\n        Escape-sequences\r\n\r\n        Escape-sequences are the preferred way of specifying 'special' character\r\ns. They\r\n        are introduced by the '\\'-character and followed by one of a few regular\r\n        letters, e.g. '\\n' or '\\r' (see the table below).\r\n\r\n        Escape-sequences may occur within any string at any position; they are r\r\neplaced\r\n        at parsetime (opposed to runtime), i.e. as soon as yabasic discovers the\r\n        string, with their corresponding special character. As a consequence of \r\nthis\r\n        len(\"\\a\") returns 1, because yabasic replaces \"\\a\" with the matching spe\r\ncial\r\n        character just before the program executes.\r\n\r\n        Table 8.1. Escape sequences\r\n\r\n        +--------------------------------------------+\r\n        |Escape Sequence| Matching special character |\r\n        |---------------+----------------------------|\r\n        |\\n             |newline                     |\r\n        |---------------+----------------------------|\r\n        |\\t             |tabulator                   |\r\n        |---------------+----------------------------|\r\n        |\\v             |vertical tabulator          |\r\n        |---------------+----------------------------|\r\n        |\\b             |backspace                   |\r\n        |---------------+----------------------------|\r\n        |\\r             |carriage return             |\r\n        |---------------+----------------------------|\r\n        |\\f             |formfeed                    |\r\n        |---------------+----------------------------|\r\n        |\\a             |alert (i.e. a beeping sound)|\r\n        |---------------+----------------------------|\r\n        |\\\\             |backslash                   |\r\n        |---------------+----------------------------|\r\n        |\\'             |single quote                |\r\n        |---------------+----------------------------|\r\n        |\\\"             |double quote                |\r\n        |---------------+----------------------------|\r\n        |\\xHEX          |chr$(HEX) (see below)       |\r\n        +--------------------------------------------+\r\n\r\n        Note, that an escape sequences of the form \\xHEX allows one to encode ar\r\nbitrary\r\n        characters as long as you know their position (as a hex-number) within t\r\nhe\r\n        ascii-charset: For example \\x012 is transformed into the character chr$(\r\n18) (or\r\n        chr$(dec(\"12\",16)). Note that \\x requires a hexa-decimal number (and the\r\n        hexa-decimal string \"12\" corresponds to the decimal number 18).\r\n\r\n        Creating a standalone program from your yabasic-program\r\n\r\n        Creating a standalone-program from the command line\r\n        Creating a standalone-program from within your program\r\n        Downsides of creating a standalone program\r\n        See also\r\n\r\n        Note\r\n\r\n        The bind-feature, which is described below, is at an experimental stage \r\nright\r\n        now. It works (at least for me !) under Windows and Linux, but I cannot \r\neven\r\n        promise it for other variants of Unix. However, if it does not work for \r\nyour\r\n        Unix, I will at least try to make it work, if you give me sufficient\r\n        information of your system.\r\n\r\n        Sometimes you may want to give one of your yabasic-programs to other peo\r\nple.\r\n        However, what if those other people do not have yabasic installed ? In t\r\nhat\r\n        case you may create a standalone-program from your yabasic-program, i.e.\r\n an\r\n        executable, that may be executed on its own, standalone, even (and espec\r\nially\r\n        !) on computers, that do not have yabasic installed. Having created a\r\n        standalone program, you may pass it around like any other program (e.g. \r\none\r\n        written in C) and you can be sure that your program will execute right a\r\nway.\r\n\r\n        Such a standalone-program is simply created by copying the full yabasic\r\n        -interpreter and your yabasic-program (plus all the libraries it does im\r\nport)\r\n        together into a single, new program, whose name might be chosen at will \r\n(under\r\n        windows of course it should have the ending .exe). If you decide to crea\r\nte a\r\n        standalone-program, there are three bits in yabasic, that you may use:\r\n\r\n          * The bind-command, which does the actual job of creating the standalo\r\nne\r\n            program from the yabasic-interpreter and your program.\r\n\r\n          * The command-line Option --bind (see options), which does the same fr\r\nom the\r\n            command-line.\r\n\r\n          * The special peek(\"isbound\"), which may be used to check, if the yaba\r\nsic\r\n            -program containing this peek is bound to the interpreter as part of\r\n a\r\n            standalone program.\r\n\r\n        With these bits you know enough to create a standalone-program. Actually\r\n there\r\n        are two ways to do this: on the command line and from within your progra\r\nm.\r\n\r\n        Creating a standalone-program from the command line\r\n\r\n        Let's say you have the following very simple program within the file foo\r\n.yab:\r\n\r\n        print \"Hello World !\"\r\n\r\n        Normally you would start this yabasic-program by typing yabasic foo.yab \r\nand as\r\n        a result the string Hello World ! would appear on your screen. However, \r\nto\r\n        create a standalone-program from foo.yab you would type:\r\n\r\n        yabasic -bind foo.exe foo.yab\r\n\r\n        This command does not execute your program foo.yab but rather create a\r\n        standalone-program foo.exe. Note: under Unix you would probably name the\r\n        standalone program foo or such, omitting the windows-specific ending .ex\r\ne.\r\n\r\n        Yabasic will confirm by printing something like: ---Info: Successfully b\r\nound\r\n        'yabasic' and 'foo.yab' into 'foo.exe'.\r\n\r\n        After that you will find a program foo.exe (which must be made executabl\r\ne with\r\n        the chmod-command under Unix first). Now, executing this program foo.exe\r\n (or\r\n        foo under Unix) will produce the output Hello World !.\r\n\r\n        This newly created program foo.exe might be passed around to anyone, eve\r\nn if he\r\n        does not have yabasic installed.\r\n\r\n        Creating a standalone-program from within your program\r\n\r\n        It is possible to write a yabasic-program, that binds itself to the yaba\r\nsic\r\n        -interpreter. Here is an example:\r\n\r\n        if (!peek(\"isbound\")) then\r\n          bind \"foo\"\r\n          print \"Successfully created the standalone executable 'foo' !\"\r\n          exit\r\n        endif\r\n\r\n        print \"Hello World !\"\r\n\r\n        If you run this program (which may be saved in the file foo.yab) via yab\r\nasic\r\n        foo.yab, the peek(\"isbound\") in the first line will check, if the progra\r\nm is\r\n        already part of a standalone-program. If not (i.e. if the yabasic-interp\r\nreter\r\n        and the yabasic-program are separate files) the bind-command will create\r\n a\r\n        standalone program foo containing both. As a result you would see the ou\r\ntput\r\n        Successfully created the standalone executable 'foo' !. Note: Under Wind\r\nows you\r\n        would probably choose the filename foo.exe.\r\n\r\n        Now, if you run this standalone executable foo (or foo.exe), the very sa\r\nme\r\n        yabasic-program that is shown above will be executed again. However, thi\r\ns time\r\n        the peek(\"isbound\") will return TRUE and therefore the condition of the\r\n        if-statement is false and the three lines after then are not executed. R\r\nather\r\n        the last print-statement will run, and you will see the output Hello Wor\r\nld !.\r\n\r\n        That way a yabasic-program may turn itself into a standalone-program.\r\n\r\n        Downsides of creating a standalone program\r\n\r\n        Now, before you go out and turn all your yabasic-programs into standalon\r\ne\r\n        programs, please take a second to consider the downsides of doing so:\r\n\r\n          * The new standalone program will be at least as big as the interprete\r\nr\r\n            itself, so you need to pass a few hundred kilobytes around, just to \r\nsave\r\n            people from having to install yabasic themselves.\r\n\r\n          * There is no easy way to extract your yabasic-program from within the\r\n            standalone program: If you ever want to change it, you need to have \r\nit\r\n            around separately.\r\n\r\n          * If a new version of yabasic becomes available, again you need to rec\r\nreate\r\n            all of your standalone programs to take advantage of bugfixes and\r\n            improvements.\r\n\r\n        So, being able to create a standalone program is certainly a good thing,\r\n but\r\n        certainly not a silver bullet.\r\n\r\n        See also\r\n\r\n        The bind-command, the peek-function and the command line options.\r\n\r\n        Chapter 9. A few example programs\r\n\r\n        A very simple program\r\n        The demo of yabasic\r\n\r\n        A very simple program\r\n\r\n        The program below is a very simple program:\r\n\r\n        repeat\r\n          input \"Please enter the first number, to add \" a\r\n          input \"Please enter the second number, to add \" b\r\n          print a+b\r\n        until(a=0 and b=0)\r\n\r\n        This program requests two numbers, which it than adds. The process is re\r\npeated\r\n        until you enter zero (or nothing) twice.\r\n\r\n        The demo of yabasic\r\n\r\n        The listing below is the demo of yabasic. Note, that parts of this demo \r\nhave\r\n        been written before some of the more advanced features (e.g subroutines)\r\n of\r\n        yabasic have been implemented. So please do not take this as a particula\r\nr good\r\n        example of yabasic-code.\r\n\r\n        \/\/\r\n        \/\/      This program demos yabasic\r\n        \/\/\r\n\r\n        \/\/      Check, if screen is large enough\r\n        clear screen\r\n        sw=peek(\"screenwidth\"):sh=peek(\"screenheight\")\r\n        if (sw&lt;78 or sh&lt;24) then\r\n          print\r\n          print \"  Sorry, but your screen is to small to run this demo !\"\r\n          print\r\n          end\r\n        endif\r\n        sw=78:sh=24\r\n\r\n        \/\/  Initialize everything\r\n        restore mmdata\r\n        read mmnum:dim mmtext$(mmnum)\r\n        for a=1 to mmnum:read mmtext$(a):next a\r\n\r\n        \/\/  Main loop selection of demo\r\n        ysel=1\r\n        label mainloop\r\n        clear screen\r\n        print colour(\"cyan\",\"magenta\") at(7,2) \"################################\r\n\"\r\n        print colour(\"cyan\",\"magenta\") at(7,3) \"################################\r\n\"\r\n        print colour(\"cyan\",\"magenta\") at(7,4) \"################################\r\n\"\r\n        print colour(\"yellow\",\"blue\") at(8,3) \" This is the demo for yabasic \"\r\n        yoff=7\r\n        for a=1 to mmnum\r\n          if (a=mmnum) then ydisp=1:else ydisp=0:fi\r\n          if (a=ysel) then\r\n            print colour(\"blue\",\"green\") at(5,yoff+ydisp+a) mmtext$(a);\r\n          else\r\n            print at(5,yoff+ydisp+a) mmtext$(a);\r\n          endif\r\n        next a\r\n        print at(3,sh-3) \"Move selection with CURSOR KEYS (or u and d),\"\r\n        print at(3,sh-2) \"Press RETURN or SPACE to choose, ESC to quit.\"\r\n\r\n        do    \/\/ loop for keys pressed\r\n          rev=1\r\n          do    \/\/ loop for blinking\r\n            k$=inkey$(0.4)\r\n            if (k$=\"\") then\r\n              if (ysel=mmnum) then\r\n                if (rev=1) then\r\n                  print colour(\"blue\",\"green\") at(5,yoff+mmnum+1) mmtext$(mmnum)\r\n;\r\n                  rev=0\r\n                else\r\n                  print colour(\"yellow\",\"red\") at(5,yoff+mmnum+1) mmtext$(mmnum)\r\n;\r\n                  rev=1\r\n                endif\r\n              endif\r\n            else    \/\/ key has been pressed, leave loop\r\n              break\r\n            endif\r\n          loop    \/\/ loop for blinking\r\n\r\n          yalt=ysel\r\n          if (k$=\"up\" or k$=\"u\") then\r\n            if (ysel=1) then ysel=mmnum else ysel=ysel-1 fi\r\n            redraw():heal():continue\r\n          fi\r\n          if (k$=\"down\" or k$=\"d\") then\r\n            if (ysel=mmnum) then ysel=1 else ysel=ysel+1 fi\r\n            redraw():heal():continue\r\n          fi\r\n          if (k$=\" \" or k$=\"enter\" or k$=\"right\") then\r\n            on ysel gosub overview,bitmap,tetraeder,endit\r\n            goto mainloop\r\n          fi\r\n          if (k$=\"esc\") then\r\n            endit()\r\n          fi\r\n          beep\r\n          print at(3,sh-5) \"Invalid key: \",k$,\"         \"\r\n        loop    \/\/ loop for keys pressed\r\n\r\n        \/\/  redraw line\r\n        sub redraw()\r\n          if (yalt=mmnum) then ydisp=1:else ydisp=0:fi\r\n          print at(5,yoff+yalt+ydisp) mmtext$(yalt);\r\n          if (ysel=mmnum) then ydisp=1:else ydisp=0:fi\r\n          print colour(\"blue\",\"green\") at(5,yoff+ysel+ydisp) mmtext$(ysel);\r\n          return\r\n        end sub\r\n\r\n        \/\/  erase a line\r\n        sub heal()\r\n          print at(3,sh-5) \"                                                    \r\n   \"\r\n          return\r\n        end sub\r\n\r\n        \/\/  Go here to exit\r\n        label endit\r\n          print at(3,sh-8) \"Hope you liked it ...\\n   \";\r\n          exit\r\n        return\r\n\r\n        \/\/  Present a short overview\r\n        label overview\r\n          clear screen\r\n          print\r\n          print \"  Yabasic is a quite traditional basic: It comes with\"\r\n          print \"  print, input, for-next-loops, goto, gosub, while and\"\r\n          print \"  repeat. It has user defined procedures and libraries,\"\r\n          print \"  however, it is not object oriented.\\n\"\r\n          print \"  Yabasic makes it easy to open a window, draw lines\"\r\n          print \"  and print the resulting picture.\\n\"\r\n          print \"  Yabasic programs are interpreted and run under Unix\"\r\n          print \"  and Windows. The Yabasic interpreter (around 200K)\"\r\n          print \"  and any Yabasic program can be glued together to\"\r\n          print \"  form a standalone executable.\\n\"\r\n          print \"  Yabasic is free software, i.e. subject to the\"\r\n          print \"  MIT License.\\n\"\r\n          print \"\\n\\n\\n  While you read this, I am calculating prime numbers,\\n\"\r\n          print \"  Press any key to return to main menu ...\"\r\n          can=1\r\n          print at(6,17) \"This is a prime number: \"\r\n          label nextcan\r\n          can=can+2\r\n          for i=2 to sqrt(can):if (frac(can\/i)=0) then goto notprime:fi:next i\r\n          print at(32,17) can;\r\n          label notprime\r\n          if (lower$(inkey$(0))&lt;&gt;\"\") then\r\n            print at(10,sh) \"Wrapping around once ...\";\r\n            for x=1 to sw\r\n              a$=getscreen$(0,0,1,sh-2)\r\n              b$=getscreen$(1,0,sw-1,sh-2)\r\n              putscreen b$,0,0\r\n              putscreen a$,sw-1,0\r\n            next x\r\n            sleep 2\r\n            return\r\n          fi\r\n        goto nextcan\r\n\r\n        \/\/  Show some animated bitmaps\r\n        label bitmap\r\n          clear screen\r\n          print\r\n          print \"Yabasic offers some commands for drawing simple graphics.\"\r\n          print reverse at(5,12) \" Press any key to return to main menu ... \"\r\n\r\n          n=20\r\n          open window 400,400\r\n\r\n          for b=20 to 0 step -1\r\n            color 255-b*12,0,b*12\r\n            fill circle 200,200,b\r\n          next b\r\n          c$=getbit$(179,179,221,221)\r\n          for a=1 to 2000\r\n            color ran(255),ran(255),ran(255)\r\n            x=ran(500)-100:y=ran(500)-100\r\n            fill rectangle ran(500)-100,ran(500)-100,ran(500)-100,ran(500)-100\r\n          next a\r\n\r\n          x=200:y=200:phi=ran(2*pi):dx=2*sin(phi):dy=2*cos(phi)\r\n          o$=\"\"\r\n          count=0\r\n          label pong\r\n            count=count+1\r\n            if (o$&lt;&gt;\"\") putbit o$,xo-2,yo-2\r\n            if (count&gt;1000) then\r\n              phi=ran(2*pi):dx=2*sin(phi):dy=2*cos(phi)\r\n              sleep 2\r\n              count=0\r\n            endif\r\n            xo=x:yo=y\r\n            x=x+dx:y=y+dy\r\n            o$=getbit$(x-2,y-2,x+46,y+46)\r\n            putbit c$,x,y,\"t\"\r\n            if (x&lt;0 or x&gt;360) dx=-dx\r\n            if (y&lt;0 or y&gt;360) dy=-dy\r\n            if (inkey$(0)&lt;&gt;\"\") then\r\n              close window\r\n              return\r\n            endif\r\n          goto pong\r\n        return\r\n\r\n        label tetraeder\r\n\r\n        open window 400,400\r\n        clear window\r\n        clear screen\r\n        print reverse at(5,12) \" Press any key to return to main menu ... \"\r\n\r\n        dim opoints(4,3)\r\n        restore points\r\n        for n=1 to 4:for p=1 to 3:read opoints(n,p):next p:next n\r\n\r\n        dim triangles(4,3)\r\n        restore triangles\r\n        for n=1 to 4:for p=1 to 3:read triangles(n,p):next p:next n\r\n\r\n        phi=0:dphi=0.1:psi=0:dpsi=0.05\r\n        dim points(4,3)\r\n\r\n        r=60:g=20\r\n        dr=0.5:dg=1.2:db=3\r\n        label main\r\n\r\n          phi=phi+dphi\r\n          psi=psi+dpsi\r\n          for n=1 to 4\r\n            points(n,1)=opoints(n,1)*cos(phi)-opoints(n,2)*sin(phi)\r\n            points(n,2)=opoints(n,2)*cos(phi)+opoints(n,1)*sin(phi)\r\n            p2=          points(n,2)*cos(psi)-opoints(n,3)*sin(psi)\r\n            points(n,3)=opoints(n,3)*cos(psi)+ points(n,2)*sin(psi)\r\n            points(n,2)=p2\r\n          next n\r\n\r\n          r=r+dr:if (r&lt;0 or r&gt;60) dr=-dr\r\n          g=g+dg:if (g&lt;0 or g&gt;60) dg=-dg\r\n          b=b+db:if (b&lt;0 or b&gt;60) db=-db\r\n          dm=dm+0.01\r\n          m=120-80*sin(dm)\r\n          for n=1 to 4\r\n            p1=triangles(n,1)\r\n            p2=triangles(n,2)\r\n            p3=triangles(n,3)\r\n            n1=points(p1,1)+points(p2,1)+points(p3,1)\r\n            n2=points(p1,2)+points(p2,2)+points(p3,2)\r\n            n3=points(p1,3)+points(p2,3)+points(p3,3)\r\n            if (n3&gt;0) then\r\n              sp=n1*0.5-n2*0.7-n3*0.6\r\n              color 60+r+30*sp,60+g+30*sp,60+b+30*sp\r\n              fill triangle 200+m*points(p1,1),200+m*points(p1,2),200+m*points(p\r\n2,1),200+m*points(p2,2),200+m*points(p3,1),200+m*points(p3,2)\r\n            endif\r\n          next n\r\n          if (inkey$(0.1)&lt;&gt;\"\") close window:return\r\n          clear window\r\n        goto main\r\n\r\n        label points\r\n        data  -1,-1,+1,  +1,-1,-1,  +1,+1,+1,  -1,+1,-1\r\n        label triangles\r\n        data  1,2,4,  2,3,4,  1,3,4,  1,2,3\r\n\r\n        \/\/  Data section ...\r\n        label mmdata\r\n        \/\/  Data for main menu: Number and text of entries in main menu\r\n        data 4\r\n        data \"   Yabasic in a nutshell   \"\r\n        data \"   Some graphics           \"\r\n        data \"   A rotating Tetraeder    \"\r\n        data \"   Exit this demo          \"\r\n\r\n        Chapter 10. The Copyright of yabasic\r\n\r\n        yabasic may be copied under the terms of the MIT License, which is distr\r\nibuted\r\n        with yabasic in the file LICENSE.\r\n\r\n        The MIT License grants extensive rights as long as you keep the copyrigh\r\nt\r\n        notice present in most files untouched. Here is a list of things that ar\r\ne\r\n        possible under the terms of the MIT License:\r\n\r\n          * Put yabasic on your own homepage or CD and even charge for the servi\r\nce of\r\n            distributing yabasic.\r\n\r\n          * Write your own yabasic-programs, pack your program and yabasic into \r\na\r\n            package and sell the whole thing.\r\n\r\n          * Modify yabasic and add or remove features, sell the modified version\r\n            without adding the sources.\r\n\r\nAUTHOR\r\n       Marc Ihm, with the input and suggestions from many others.\r\n\r\nSEE ALSO\r\n       yabasic.htm - for the hyperlinked version of the text that is presented\r\n       above.\r\n\r\n       www.yabasic.de - for further information on yabasic.\r\n\r\nBUGS\r\n       Still some.\r\n\r\n<\/code><\/pre>\n<h3>\u611f\u8c22\u60a8\u9605\u8bfb\u5230\u6700\u540e\u3002<\/h3>\n<p>\u7ed9\u4e2a\u8d5e?\uff0c\u8bf7\u5173\u6ce8\u4e00\u4e0b\u3002<\/p>\n<h4>\u975e\u5e38\u611f\u8c22\u60a8\u8bfb\u5230\u6700\u540e\u4e00\u53e5\u8bdd\u3002<\/h4>\n<p>\u8bf7\u70b9\u51fb\u7eff\u8272\u7684\u201c\u8d5e\u201d\u56fe\u6807\uff0c\u5e76\u5173\u6ce8\u6211\uff0c\u4eab\u53d7\u60a8\u7684\u5e78\u798f\u751f\u6d3b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528GCC\u5728Docker\u4e2d\u542f\u52a8BASIC\u3002 $ docker run -it gcc \/bin\/bash \u641c\u7d22 [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34852","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528Docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker(116) - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker116\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528Docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker(116)\" \/>\n<meta property=\"og:description\" content=\"\u4f7f\u7528GCC\u5728Docker\u4e2d\u542f\u52a8BASIC\u3002 $ docker run -it gcc \/bin\/bash \u641c\u7d22 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker116\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-22T00:32:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T00:24:47+00:00\" \/>\n<meta name=\"author\" content=\"\u5b87, \u534e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5b87, \u534e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"189 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/\",\"name\":\"\u4f7f\u7528Docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker(116) - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-09-22T00:32:19+00:00\",\"dateModified\":\"2024-01-15T00:24:47+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528Docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker(116)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\",\"name\":\"\u5b87, \u534e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"caption\":\"\u5b87, \u534e\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528Docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker(116) - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker116\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528Docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker(116)","og_description":"\u4f7f\u7528GCC\u5728Docker\u4e2d\u542f\u52a8BASIC\u3002 $ docker run -it gcc \/bin\/bash \u641c\u7d22 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker116\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-09-22T00:32:19+00:00","article_modified_time":"2024-01-15T00:24:47+00:00","author":"\u5b87, \u534e","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5b87, \u534e","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"189 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/","name":"\u4f7f\u7528Docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker(116) - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-09-22T00:32:19+00:00","dateModified":"2024-01-15T00:24:47+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528Docker\u8fdb\u884c\u57fa\u672c\u64cd\u4f5c\u7684\u793a\u4f8b\uff1adocker(116)"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458","name":"\u5b87, \u534e","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","caption":"\u5b87, \u534e"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8docker%e8%bf%9b%e8%a1%8c%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c%e7%9a%84%e7%a4%ba%e4%be%8b%ef%bc%9adocker116%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=34852"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34852\/revisions"}],"predecessor-version":[{"id":57755,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34852\/revisions\/57755"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=34852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=34852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=34852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}