Browse code

New Version 1.7.9. New Packages structur

Lorenz Glaser authored onSun/Sep/2020 18:0:th
Showing234 changed files
1 1
deleted file mode 100644
... ...
@@ -1,131 +0,0 @@
1
-
2
-
3
-
4
-
5
-			 The "Artistic License"
6
-
7
-				Preamble
8
-
9
-The intent of this document is to state the conditions under which a
10
-Package may be copied, such that the Copyright Holder maintains some
11
-semblance of artistic control over the development of the package,
12
-while giving the users of the package the right to use and distribute
13
-the Package in a more-or-less customary fashion, plus the right to make
14
-reasonable modifications.
15
-
16
-Definitions:
17
-
18
-	"Package" refers to the collection of files distributed by the
19
-	Copyright Holder, and derivatives of that collection of files
20
-	created through textual modification.
21
-
22
-	"Standard Version" refers to such a Package if it has not been
23
-	modified, or has been modified in accordance with the wishes
24
-	of the Copyright Holder as specified below.
25
-
26
-	"Copyright Holder" is whoever is named in the copyright or
27
-	copyrights for the package.
28
-
29
-	"You" is you, if you're thinking about copying or distributing
30
-	this Package.
31
-
32
-	"Reasonable copying fee" is whatever you can justify on the
33
-	basis of media cost, duplication charges, time of people involved,
34
-	and so on.  (You will not be required to justify it to the
35
-	Copyright Holder, but only to the computing community at large
36
-	as a market that must bear the fee.)
37
-
38
-	"Freely Available" means that no fee is charged for the item
39
-	itself, though there may be fees involved in handling the item.
40
-	It also means that recipients of the item may redistribute it
41
-	under the same conditions they received it.
42
-
43
-1. You may make and give away verbatim copies of the source form of the
44
-Standard Version of this Package without restriction, provided that you
45
-duplicate all of the original copyright notices and associated disclaimers.
46
-
47
-2. You may apply bug fixes, portability fixes and other modifications
48
-derived from the Public Domain or from the Copyright Holder.  A Package
49
-modified in such a way shall still be considered the Standard Version.
50
-
51
-3. You may otherwise modify your copy of this Package in any way, provided
52
-that you insert a prominent notice in each changed file stating how and
53
-when you changed that file, and provided that you do at least ONE of the
54
-following:
55
-
56
-    a) place your modifications in the Public Domain or otherwise make them
57
-    Freely Available, such as by posting said modifications to Usenet or
58
-    an equivalent medium, or placing the modifications on a major archive
59
-    site such as uunet.uu.net, or by allowing the Copyright Holder to include
60
-    your modifications in the Standard Version of the Package.
61
-
62
-    b) use the modified Package only within your corporation or organization.
63
-
64
-    c) rename any non-standard executables so the names do not conflict
65
-    with standard executables, which must also be provided, and provide
66
-    a separate manual page for each non-standard executable that clearly
67
-    documents how it differs from the Standard Version.
68
-
69
-    d) make other distribution arrangements with the Copyright Holder.
70
-
71
-4. You may distribute the programs of this Package in object code or
72
-executable form, provided that you do at least ONE of the following:
73
-
74
-    a) distribute a Standard Version of the executables and library files,
75
-    together with instructions (in the manual page or equivalent) on where
76
-    to get the Standard Version.
77
-
78
-    b) accompany the distribution with the machine-readable source of
79
-    the Package with your modifications.
80
-
81
-    c) give non-standard executables non-standard names, and clearly
82
-    document the differences in manual pages (or equivalent), together
83
-    with instructions on where to get the Standard Version.
84
-
85
-    d) make other distribution arrangements with the Copyright Holder.
86
-
87
-5. You may charge a reasonable copying fee for any distribution of this
88
-Package.  You may charge any fee you choose for support of this
89
-Package.  You may not charge a fee for this Package itself.  However,
90
-you may distribute this Package in aggregate with other (possibly
91
-commercial) programs as part of a larger (possibly commercial) software
92
-distribution provided that you do not advertise this Package as a
93
-product of your own.  You may embed this Package's interpreter within
94
-an executable of yours (by linking); this shall be construed as a mere
95
-form of aggregation, provided that the complete Standard Version of the
96
-interpreter is so embedded.
97
-
98
-6. The scripts and library files supplied as input to or produced as
99
-output from the programs of this Package do not automatically fall
100
-under the copyright of this Package, but belong to whoever generated
101
-them, and may be sold commercially, and may be aggregated with this
102
-Package.  If such scripts or library files are aggregated with this
103
-Package via the so-called "undump" or "unexec" methods of producing a
104
-binary executable image, then distribution of such an image shall
105
-neither be construed as a distribution of this Package nor shall it
106
-fall under the restrictions of Paragraphs 3 and 4, provided that you do
107
-not represent such an executable image as a Standard Version of this
108
-Package.
109
-
110
-7. C subroutines (or comparably compiled subroutines in other
111
-languages) supplied by you and linked into this Package in order to
112
-emulate subroutines and variables of the language defined by this
113
-Package shall not be considered part of this Package, but are the
114
-equivalent of input as in Paragraph 6, provided these subroutines do
115
-not change the language in any way that would cause it to fail the
116
-regression tests for the language.
117
-
118
-8. Aggregation of this Package with a commercial distribution is always
119
-permitted provided that the use of this Package is embedded; that is,
120
-when no overt attempt is made to make this Package's interfaces visible
121
-to the end user of the commercial distribution.  Such use shall not be
122
-construed as a distribution of this Package.
123
-
124
-9. The name of the Copyright Holder may not be used to endorse or promote
125
-products derived from this software without specific prior written permission.
126
-
127
-10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
128
-IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
129
-WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
130
-
131
-				The End
132 0
deleted file mode 100644
... ...
@@ -1,65 +0,0 @@
1
-1. check AutoFooter if all files are there, add new files when necessary
2
-
3
-2. generate flex.c and bison.c by typing:
4
-	flex -i -I -L -s -t yabasic.flex >flex.c
5
-	perl -i -n -e 'if (!/^\#include\s+<unistd.h>\s+$$/) {print if $$i;$$i++}' flex.c
6
-	bison  -d -l -t -v --output-file bison.c yabasic.bison 
7
-
8
-3. edit flex.c as follows:
9
-  - add the headers (after #include<stdio.h>) and the static declaration
10
-  	#include <zlib.h>
11
-	#include "program.h"
12
-	static int isparsed = 0;
13
-  - replace the default input buffer size
14
-  	#define YY_BUF_SIZE 16384
15
-    with
16
-    	#define YY_BUF_SIZE PROGLEN
17
-  - search for 
18
-  	#define YY_INPUT(buf,result,max_size) \ 
19
-    replace the last lines of this define 
20
-        else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
21
-                  && ferror( yyin ) ) \
22
-                YY_FATAL_ERROR( "input in flex scanner failed" ); 
23
-    with
24
-    	else if ( ((result = zread( buf, 1, max_size, yyin )) == 0) && !ferror( yyin ) ) \
25
-                YY_FATAL_ERROR( "input in flex scanner failed" ); 
26
-  - add to the function 
27
-	static int yy_get_next_buffer()
28
-    after
29
-	int ret_val;
30
-    the following line
31
-	if(isparsed) return EOB_ACT_END_OF_FILE;
32
-  - add the function zread at the end of flex.c:
33
-	int zread(char* dest, size_t memb_size, size_t num_memb, FILE *file)
34
-	{
35
-        	long destlen = PROGLEN;
36
-        	if(isparsed==1)
37
-               		return 0;
38
-        	isparsed = 1;
39
-        	uncompress(dest,&destlen,myProg,sizeof(myProg));
40
-        	return destlen;
41
-	} 
42
-  - NOTE: you only have to go through this process when new commands have been added to
43
-    yabasic.flex. Otherwise you can just take the modified flex.c from the last BuildFactory.
44
-
45
-4. edit main.c as follows:	
46
-  - search for the function
47
-	int isbound(void) 
48
-    delete the whole function and replace it with:
49
-	int isbound(void) 
50
-	{
51
-  		FILE *interpreter;
52
-  		if (!interpreter_path || !interpreter_path[0]) {
53
-    			error(FATAL,"interpreter_path is not set !");
54
-    			return 0;
55
-  		}
56
-  		if (!(interpreter=fopen(interpreter_path,"r"))) {
57
-    			sprintf(string,"Couldn't open '%s' to check, if it is bound: %s",interpreter_path,my_strerror(errno));
58
-    			error(WARNING,string);
59
-    			return 0;
60
-  		}
61
-
62
-  		return 1; 
63
-	}
64
-
65
-
66 0
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-Several commands require ncurses compiled in to work. These are all related to terminal functions. If one needs to run a terminal app that uses these functions one needs to re-compile yab. 
2
-
3
-Compiling yab with ncurses
4
-
5
-1 change src/global.h line 1
6
-
7
-from :
8
-
9
-//define BUILD_NCURSES
10
-
11
-to: 
12
-
13
-#define BUILD_NCURSES
14
-
15
-2  change src/makefile line 92 
16
-
17
-from:
18
-
19
-LIB = -lbe -lroot -ltranslation -ltracker -lmedia  
20
-
21
-to:
22
-
23
-LIB = -lbe -lroot -ltranslation -ltracker -lmedia  -lncurses
24
-
25
-3 install ncurses and ncurses devel
26
-
27
-
28
-4
29
-run make in the src directory
30
-
31
-NOTE:
32
-
33
-An ncurses enabled  version of yab and libyab.so are not compatible with the standard version and may break working apps if installed.
34
-
35
-
36 0
deleted file mode 100644
... ...
@@ -1,88 +0,0 @@
1
-
2
-yab 1.7.5.6
3
-- fix tabview bugs introduecd in 1.7.5.5
4
-	fix tabview set command 
5
-	allow tabview to be removed by removing the parent view
6
--add Option$  "plain | bold | fixed" and point$ to texteditl set
7
-	TEXTEDIT SET TextEdit$, "plain", "25" sets the text to system plain font at 25 point size. 
8
-
9
-yab 1.7.5.5
10
--Enable tabview with tabs on the side. This removes trhe reliance on BControlLook
11
-
12
-yab Version 1.7.5.4
13
--now compiles on x86_64
14
--yab-IDE now updates BuildFactory files on launch
15
--add Window Get Windiwid$, "Minimized-To-Deskbar"
16
--update help files for yab-ide
17
-
18
-yab Version 1.7.5.3
19
-- gcc4 now compiles
20
-- fix system shutdown bug
21
-- remove un-needed BuildFactory files
22
-- add https:// to texturl
23
-- BuildFactory use declared appsig
24
-- yab-IDE use declared appsig, or use filename for appsig
25
-
26
-yab Version 1.7.5.2
27
-- use public rgb_color mix_color()
28
-
29
-yab Version 1.7.5.1
30
--add cursor to textedit set command
31
--add textedit get "countphysicallines"
32
--fix ran() command
33
--add small gutter to textedit view
34
-
35
-yab Version 1.7.5
36
--libyab.so --- smaller binaries
37
-
38
-yab Version 1.7.4.5 Changes from 1.7.4.1
39
--use standard flex for BuildFactory
40
--ATTRIBUTE SET and ATTRIBUTE GET$ re-worked to work better
41
--open a, "File", "r+"
42
--TEXTEDIT SET Option$= "align", left/center/right
43
-
44
-yab Version 1.7.4.1 Changes from version 1.7
45
--LOCALIZE doesn't work again due to changes in haiku.
46
--TEXTCONTROL   added more options for set options.
47
-
48
- yab Version 1.7 Changes from Version 1.6
49
-- COLUMNBOX updated to Haiku style (thanks Stargater!)
50
-- STATUSBAR didn't follow LAYOUT, fixed now
51
-- RESTORE Label$ allows for dynamic label strings
52
-- various ATTRIBUTE commands
53
-- Localization now works again, see Localizer how it is done
54
-- reorganized localization commands are now: 
55
-  LOCALIZE mime$, LOCALIZE STOP, LOCALIZE, TRANSLATE$ and MENU TRANSLATE$
56
-- SUBMENU SET "Remove" now implemented
57
-- yab cleaned up (a bit at least)
58
-- yab IDE cleaned up
59
-- BuildFactory cleaned up
60
-- yab-Commands documentation cleaned up
61
-
62
-yab Version 1.6 Changes from Version 1.5
63
-- removed all ZETA and BeOS dependencies
64
-- SPINCONTROL look updated to Haiku style
65
-- CALENDAR look updated to Haiku style and code refactored
66
-- TABVIEW look updated to Haiku style
67
-- TABVIEW now supports bottom tabs (like it did on ZETA)
68
-- Haiku native tooltips are now used; they still suck, but this finally 
69
-  resolves the race condition bug (this should also resolve the hanging
70
-  BuildFactory, thx to clasqm for reporting)
71
-- using "copy" for an empty selection in TEXTEDIT does not clear the 
72
-  clipboard anymore (thx to streakx for reporting)
73
-- Haiku forced a minimum button height, yab does not like force (thx to 
74
-  Lelldorin for reporting)
75
-- Title in BOXVIEW is now shown correctly (thx to Lelldorin for reporting)
76
-- Window flags don't reset anymore after calling WINDOW SET (thx to clasqm 
77
-  for reporting)
78
-
79
-Known problems:
80
-- Tooltips cannot be unset, they cannot change color, they steal focus (fixed on
81
-  new Haiku builds), they suck (blame the Haiku team ;))
82
-- Tooltips do not work for all Widgets
83
-- Spincontrol cannot move shift-tab backwards
84
-
85
-Other Fixes (1.6):
86
-- Scrolling in the yab IDE works again with new Haiku builds (the bug in Haiku
87
-  got fixed, thx to leszek for reporting, thx for zooey for fixing)
88
-
89 0
deleted file mode 100644
... ...
@@ -1,32 +0,0 @@
1
-Credits 
2
-
3
-yab is yabasic for Haiku done by Jan Bungeroth (jan@be-logos.org).
4
-
5
-yab would not be possible without a lot of support. Thanks go to (in no particular order):
6
-
7
-Source Code:
8
-Marc-Oliver Ihm (yabasic)
9
-Alex Sarikov (CalendarControl)
10
-William Kakes (URLView)
11
-YNOP (SplitPane)
12
-DarkWyrm (Spinner)
13
-Brent Miszalski (TexView)
14
-Michael Lloyd Lee (AutoTextView)
15
-Marco Nelissen (BubbleHelper)
16
-Marc Flerackers and Stephan Assmus (Haiku TabView)
17
-Axel Dörfler (Haiku tooltips)
18
-Jim Saxton (porting to Haiku PM change to standard flex.c for BF)
19
-Jessica Hamilton (libyab.so)
20
-
21
-Alpha and Beta Testing and Feature Nagging:
22
-Michel Clasquin
23
-bbjimmy
24
-Lelldorin
25
-lorglas
26
-Ralf Schuelke
27
-DasJott
28
-Lukas Linemayr
29
-and others
30
-
31
-Translation:
32
-Begasus for the Dutch yab-IDE locale
33 0
deleted file mode 100644
... ...
@@ -1,22 +0,0 @@
1
-Licensing yab or your yab program
2
-
3
-yab is distributed under the Artistic License which is an
4
-approved open source license. Read the file ARTISTIC for
5
-details. 
6
-
7
-Basically the Artistic License allows you to:
8
-- bind your program to yab and release it under any license you wish; 
9
-especially you are allowed to sell your program commercially, when bound
10
-- compile your program with the BuildFactory and release it under any license you wish; 
11
-especially you are allowed to sell your program commercially
12
-- copy and distribute yab freely
13
-- copy or distribute yab as part of a distribution
14
-- modify yab
15
-- distribute a modified yab freely without releasing the source code
16
-
17
-For distributing a modified yab commercially, you should contact me first. 
18
-The following parts of yab are not allowed in commercially modified 
19
-versions without the permission of the authors:
20
-SplitPane
21
-
22
-Changes to CalanderControl have to be republished under GPL.
23 0
deleted file mode 100644
... ...
@@ -1,12 +0,0 @@
1
-ToDo
2
-
3
-Features:
4
-- LPT and COM signal send/receive, specific request by lorglas
5
-- Layout
6
-
7
-Bugs:
8
-- drop file bug ide
9
-- strings cannot handle chr$(0)
10
-- TEXTEDIT selection somehow buggy, seems to be a Haiku issue
11
-- SOUND commands don't work because of a missing API call in Haiku
12
-- printing seems to be broken (further testing needed)
13 0
deleted file mode 100644
... ...
@@ -1,844 +0,0 @@
1
--= A =-
2
-
3
-ALERT Text$, ButtonLabel$, Type$
4
-  Opens an alert window with Text$ and the button Label$ of type Type$
5
-  Type$ = "none/info/idea/warning/stop"
6
-Selected = ALERT Text$, Button1$, Button2$, Button3$, Type$
7
-  A more general Alert window. Specify a text and up to three buttons.
8
-  If Button2$ or Button3$ is set to "", the button is not shown.
9
-  The selected button is returned, where Selected = 1 is the left, 2 the middle and 3 the right button.
10
-  Type$ = "none/info/idea/warning/stop"
11
-ATTRIBUTE SET Type$, Name$, Value$, Filename$
12
-  Set the attribute Name$ of type Type$ for the file Filename$ with the string Value$.
13
-  These are valid types Type$:
14
-  "String", "Int", "Long", "Double", "Float", "Mime", "Bool"
15
-ues a value$ of "true" or "false" for Bool type attributes
16
-ATTRIBUTE CLEAR Name$, Filename$
17
-  Delete the attribute Name$ from file Filename$.
18
-Value$ = ATTRIBUTE GET$ Name$, Filename$
19
-  Get the string value of the attribute Name$ for file Filename$.
20
-	Returns "true" or "false" for "Bool" type attributes.
21
-	If Name$="", returns a list of attribute names and their types separated
22
-       by " | ". returns "Unsupported" for types that are not valid for yab. 
23
-	If Name$ and Filename$ both = "", returns the current program directory.
24
-Value = ATTRIBUTE GET Name$, Filename$
25
-  Get the number value of the attribute Name$ for file Filename$.
26
-
27
-
28
--= B =-
29
-
30
-BITMAP Width, Height, ID$
31
-  Creates a new bitmap in memory, you can draw on it
32
-  A bitmap is always initialized with a white transparent background
33
-color = BITMAP COLOR x,y, ID$, ColorPart$
34
-  ColorPart$ = "red" or "green" or "blue"
35
-  Returns the color of the pixel at position (x,y) of the bitmap ID$
36
-BITMAP GET x1, y1 to x2, y2, Target_bitmap$, Source_view$
37
-  Copies specified area of Source_view$ to Target_bitmap$.
38
-BITMAP GET IconSize, Bitmap$, File$
39
-  Copies the icon, shown in Tracker, of File$ in the specified IconSize onto Bitmap$. The icon will be resized to IconSize, and properly scaled if it is an hvicon.
40
-BITMAP GET ID$, Option$, Path$
41
-  copies an icon to a bitmap
42
-  An Option can be:
43
-  "Path" = Path$ must be the path to a file
44
-  "Mime" or "Mime16" = Path$ must be the mimetype of the file which icon is to be swown.
45
-    The resulting bitmap is 16 to 16.
46
-  "Mime32" = Path$ must be the mimetype of the file which icon is to be swown.
47
-    The resulting bitmap is 32 to 32.
48
-BITMAP GET ID$, Option$
49
-  Option$ = "height" or "width" delivers height and width of bitmap ID$
50
-BITMAP REMOVE Bitmap$
51
-  Removes Bitmap$ from memory
52
-ErrCode = BITMAP IMAGE ImageFile$, Bitmap$
53
-  Load image file ImageFIle$ into a new Bitmap called Bitmap$
54
-ErrCode = BITMAP SAVE Bitmap$, FileName$, Format$
55
-  Saves a bitmap as FileName$ (overwrites existing ones!) in a Format$ of one of the following:
56
-  {"png", "tiff", "ppm", "bmp", "jpeg", "tga"}
57
-  ErrCode = 0 everything worked fine
58
-  ErrCode = 1 file could not be saved
59
-BOXVIEW x1,y1 TO x2,y2, ID$, Label$, LineType, View$
60
-  Adds a box, note: the actual view of the BOXVIEW (where you can place your widgets) is at
61
-  (x1+5,y1+10) to (x2-5,y2-5). This may be a subject of change!
62
-  LineType = 0 means no border
63
-  LineType = 1 means simple line border
64
-  LineType = 2 means fancy line border
65
-BOXVIEW SET  ID$, Option$, Value$
66
- Option$="Label" Value$=new label
67
- Option$="Line" Value$= "0" / "1" / "2"
68
-BUTTON x1,y1 TO x2,y2, ID$, Label$, View$
69
-  Sets a button at position (x1,y1) to (x2,y2) with label Label$ on the view View$
70
-BUTTON IMAGE x,y, ID$, EnabledPressed$, EnabledNormal$, Disabled$, View$
71
-  Create an image button at (x,y) on View$ with three files:
72
-  EnabledNormal$ The image of the released button 
73
-  EnabledPressed$ The image of the pressed button 
74
-  Disabled$ The image of the disabled button (you can put in an empty string "" if you don't need a
75
-            disabled button)
76
-
77
-
78
--= C =-
79
-
80
-CALENDAR x,y, ID$, Format$, Date$, View$
81
-  Open a calendar widget at (x,y), giving the format, the date and put that on the view View$.
82
-  Format$ = ("DDMMYYYY" or "MMDDYYYY") + ("." or "/" or "-"); default: "DDMMYYYY."
83
-CALENDAR SET Calendar$, Date$
84
-  Set the date according to the current format (DDMMYYYY or MMDDYYYY).
85
-date$ = CALENDAR GET$ Calendar$
86
-  Get the current date selected in Calendar$.
87
-CANVAS x1,y1 to x2,y2, ID$, View$
88
-  A canvas is a special view for flicker-free drawing. It always shows a bitmap
89
-  and thus cannot be resized. However, it does not have a drawing queue, so you
90
-  do not need DRAW FLUSH
91
-  A canvas is always initialized with a white background
92
-CHECKBOX x1,y1, ID$, Label$, IsActivated, View$
93
-  Display a checkbox at (x1,y1) with Label$ on View$; if IsActivated is set to 0, the checkbox is
94
-  off else it is on.
95
-CHECKBOX SET CheckBox$, IsActivated
96
-  (De-)Activate the check box CheckBox$.
97
-CHECKBOX IMAGE x,y, ID$, EnabledOn$, EnabledOff$, DisabledOn$, DisabledOff$, IsActivated, View$
98
-  Create an image checkbox at (x,y) on View$ with four files:
99
-  EnabledNormal$ The image of the released checkbox
100
-  EnabledPressed$ The image of the pressed checkbox
101
-  DisabledNormal$ The image of the normal disabled checkbox (you can put in an empty string "" 
102
-                  if you don't need a disabled button)
103
-  DisabledPressed$ The image of the pressed disabled checkbox (you can put in an empty string "" 
104
-                  if you don't need a disabled button)
105
-  Set isActivated to true/false when the checkbox should be on/off.
106
-CLIPBOARD COPY Text$
107
-  Copy Text$ to the system clipboard.
108
-Text$ = CLIPBOARD PASTE$
109
-  Paste ASCII text from the system clipboard into Text$.
110
-COLORCONTROL x,y, ID$, View$
111
-  Create a color control widget at x,y. Note: it's width is 276 and it's height is 54 pixels.
112
-COLORCONTROL SET ColorControl$, r,g,b
113
-  Set the color control ID$ to the color r,g,b.
114
-Value = COLORCONTROL GET ColorControl$, "Red|Blue|Green"
115
-  Get the currently selected red/green/blue value of the colorcontrol.
116
-COLUMNBOX x1,y1 TO x2,y2, ID$, HasHScrollbar, Option$, View$
117
-  HasHScrollbar is true, when the columnbox should get a horizontal scrollbar (it always has a vertical).
118
-  Option$ affects all columns! The columns can be made movable, resizable, removable
119
-  Option$ = "movable, resizable, popup, removable"
120
-  Option$ = "no-border" sets up the columnbox without border
121
-COLUMNBOX COLUMN ColumnBox$, Name$, Position, MaxWidth, MinWidth, Width, Option$
122
-  Option$ = "align-left, align-center, align-right"
123
-COLUMNBOX ADD ColumnBox$, Column, Row, Height, Item$
124
-  If Item$ = "__Icon__="+FileName$ then the image file FileName$ will be shown,
125
-  if Item$ = "__Path__="+FileName$ then the large Trackericon of the file FileName$ will be shown
126
- if Item$ = "__SmIC__="+FileName$ then the small Trackericon of the file FileName$ will be shown
127
-  if Item$ = "__Mime__="+Signature$ then the small icon of the mime type Signature$ will be shown
128
-COLUMNBOX SELECT ColumnBox$, Row
129
-  Selects Row of ColumnBox$.
130
-  Row = 0 means deselect.
131
-COLUMNBOX REMOVE ColumnBox$, Row
132
-  Removes the entries in Row of ColumnBox$
133
-COLUMNBOX CLEAR ColumnBox$
134
-  Removes all entries of ColumnBox$.
135
-COLUMNBOX COLOR ColumnBox$, Option$, r,g,b
136
-  Option$ = "selection-text, non-focus-selection, selection, text, row-divider, background"
137
-n = COLUMNBOX COUNT ColumnBox$
138
-  Returns the number of entries in ColumnBox$.
139
-Item$ = COLUMNBOX GET$ ColumnBox$, Column, Row
140
-  Returns the entry at Row in Column of Columbox$.
141
-
142
-
143
--= D =-
144
-
145
-DRAW TEXT x1,y1, Text$, View$
146
-  Draws text at position (x1,y1) on View$
147
-DRAW RECT x1,y1 TO x2,y2, View$
148
-  Draws a rectangle from (x1,y1) to (x2,y2) in the current high color on View$
149
-DRAW BITMAP x,y, Bitmap$, Mode$, View$
150
-  Draw a bitmap on a view, another bitmap or a canvas.
151
-  Possible Mode$:
152
-  "Copy" -- copy the bitmap to the target ignoring transparency
153
-  "Alpha" -- copy the bitmap to the target supporting transparency
154
-DRAW BITMAP x1,y1 TO x2,y2, Bitmap$, Mode$, View$
155
-  Draws and scales the bitmap Bitmap$.
156
-  If x2 is set to -1, the width is scaled according to the height;
157
-  if y2 is set to -1, the height is scaled according to the width;
158
-  if x2 and y2 are set to -1, the image is not scaled at all (this is like DRAW BITMAP x,y, Bitmap$, Mode$, View$).
159
-  Possible Mode$:
160
-  "Copy" -- copy the bitmap to the target ignoring transparency
161
-  "Alpha" -- copy the bitmap to the target supporting transparency
162
-DRAW DOT x1,y1, View$
163
-DRAW LINE x1,y1 TO x2,y2, View$
164
-DRAW CIRCLE x1,y1, Radius, View$
165
-DRAW CURVE x1,y1, x2,y2, x3,y3, x4,y4, View$
166
-DRAW ELLIPSE x1,y1, xRadius, yRadius, View$
167
-DRAW FLUSH View$
168
-  Deletes all former drawing commands from the drawing queue on View$
169
-LoadError = DRAW IMAGE x,y, ImageFile$, View$  
170
-  Draws the image ImageFile$ at position x,y on View$, returns LoadError 
171
-  LoadError:
172
-	0 = success
173
-	1 = file not found
174
-	2 = translator roster not found
175
-	3 = translation failed
176
-	4 = ditaching bitmap failed
177
-err = DRAW IMAGE x1,y1 TO x2,y2, Image$, View$
178
-  Draws and scales the image file Image$. Transparent images are set correctly now.
179
-  If x2 is set to -1, the width is scaled according to the height;
180
-  if y2 is set to -1, the height is scaled according to the width;
181
-  if x2 and y2 are set to -1, the image is not scaled at all (this is like DRAW IMAGE x1,y1, Image$, View$).
182
-Width = DRAW GET "Text-Width", Text$, View$
183
-  Return the width in pixel of the string Text$ in the current font of View$.
184
-Height = DRAW GET "Max-Text-Height", View$
185
-  Return the maximum height in pixel of the current font of View$. This is the size of the font plus
186
-  how far characters can descend below the baseline.
187
-FontFamilies$ = DRAW GET$ "FontFamily"
188
-  Returns a list of all installed fonts separated by "|".
189
-FontStyles$ = DRAW GET$ FontFamily$
190
-  Returns a list of all font styles for a font FontFamily$ separated by "|".
191
-DRAW SET FillOrStroke, Pattern$
192
-  FillOrStroke = 0 means fill
193
-  FillOrStroke = 1 means stroke
194
-  Pattern$ is a 8x8 1 bit map; one line is one character
195
-  Pattern$ = "HighSolidFill" means solid fill with the current high color 
196
-  Pattern$ = "LowSolidFill" means solid fill with the current low color (default)
197
-  Pattern$ = "CheckeredFill" means checkered fill
198
-DRAW SET Color$, r,g,b, View$
199
-  Color$ is one of the following:
200
-  "BGColor", r,g,b   (216,216,216 default)
201
-  "HighColor", r,g,b   (0,0,0 default)
202
-  "LowColor", r,g,b   (216,216,216 default)
203
-DRAW SET Color$, Option$, View$
204
-  Option$ is one of the following:
205
-  "Panel-Background-Color"
206
-  "Panel-Text-Color"
207
-  "Panel-Link-Color"
208
-  "Menu-Background-Color"
209
-  "Menu-Selection-Background-Color"
210
-  "Menu-Item-Text-Color"
211
-  "Menu-Selected-Item-Text-Color"
212
-  "Keyboard-Navigation-Color"
213
-  "Jan-Favorite-Color"
214
-
215
-  To those options the following can be added:
216
-  "Lighten-1-Tint"
217
-  "Lighten-2-Tint"
218
-  "Lighten-Max-Tint"
219
-  "Darken-1-Tint"
220
-  "Darken-2-Tint"
221
-  "Darken-3-Tint"
222
-  "Darken-4-Tint"
223
-  "Darken-Max-Tint"
224
-  "Disabled-Label-Tint"
225
-  "Disabled-Mark-Tint"
226
-  "Highlight-Background-Tint"
227
-
228
-  Example:
229
-  draw set "bgcolor", "Menu-Background-Color, Lighten-1-Tint", View$
230
-
231
-DRAW SET Font$, View$
232
-  Set the drawing font on View$.
233
-  Font$ = FontFamily$ + "," + FontStyle$ + "," + Size + "," + FontOption$ + "," Rotation + "," + Shear
234
-    where FontOption$ can contain the following options (only used when supported by the font):
235
-    FontOption$ = "bold" or "italic" or "outlined" or "underscore" or "strikeout" or "regular" (regular is default)
236
-    where Rotation is between 0.0 (default) and 360.0
237
-    where Shear is between 45.0 (slanted to right) and 135.0 (slanted to left) with 90.0 default
238
-      
239
-  or Font$ = "system-plain" for the plain system font,
240
-  or Font$ = "system-bold" for the bold system font,
241
-  or Font$ = "system-fixed" for the fixed system font
242
-DRAW SET "Alpha", Alpha-Value 
243
-  Sets the Alpha-Channel for the transparency of the drawing colors. Use this before setting the color
244
-  with DRAW COLOR.
245
-  Alpha-Value is a value between 0 and 255 where 0 is total transparency and 255 is opaque.
246
-  Note: When Alpha-Value is below 255, use only HighSolidFill, patterns are ignored!
247
-  Note: Transparent drawing (that is Alpha-Value below 255) is not printed (see PRINTER) correctly!
248
-DROPBOX x1,y1 TO x2,y2, ID$, Label$, View$
249
-  Adds an empty dropbox (BMenuField) at (x1,y1) to (x2,y2) known as ID$ and with a label on View$. 
250
-DROPBOX ADD DropBox$, Item$
251
-  Add Item$ to the dropbox. Use Item$ = "--" for a separator. 
252
-DROPBOX CLEAR DropBox$
253
-  Clear the drop box from all items.
254
-n = DROPBOX COUNT DropBox$
255
-  Count the number of items.
256
-Item$ = DROPBOX GET$ DropBox$, Position
257
-  Get the item at Position.
258
-DROPBOX REMOVE DropBox$, Position
259
-  Removes item number Position. 
260
-  Note: If the removed item was marked, the item before it will be marked instead. You will NOT get
261
-  a message that the marked item has changed. If the first item will be deleted, the next item in
262
-  the drop box will be marked.
263
-  Note: Each time an item was removed, the drop box count will change too!
264
-DROPBOX SELECT DropBox$, Position
265
-  Select the item at position Position. Counting starts at 0.
266
-
267
-
268
--= F =-
269
-
270
-File$ = FILEPANEL Mode$, Title$, Directory$
271
-  Mode$ = "Load-File"
272
-  Mode$ = "Load-Directory"
273
-  Mode$ = "Load-File-and-Directory"
274
-  Mode$ = "Save-File"
275
-  Opens a filepanel in Directory$. According to the Mode$, you can either select a file, 
276
-  a directory or both for loading or select/enter a file for saving. The selected file is File$.
277
-File$ = FILEPANEL Mode$, Title$, Directory$, Filename$
278
-  Same as above, except that you can provide preset Filename$ for the mode "Save-File"
279
-
280
-
281
--= I =-
282
-
283
-State = ISMOUSEIN(View$)
284
-  State = 0 the mouse cursor is not in the view View$
285
-  State = 1 the mouse cursor is in the view View$
286
-
287
-
288
--= K =-
289
-
290
-Msg$ = KEYBOARD MESSAGE$(View$)
291
-  Works like INKEY$ on the command line (well, nearly; it does not wait for input as inkey$ does).
292
-
293
-
294
--= L =-
295
-
296
-LAUNCH FileName$
297
-  Launch the program FileName$ or the associated executable
298
-LAYOUT Layout$, WindowOfView$
299
-  Set the layout for all views on the window of View$. The layout will affect all following new widgets, 
300
-  but not the already created. Draw commands are not affected by the layout, put them on an own view.
301
-  Layout$ (not case sensitive):
302
-	"Standard" = default layout, all widgets follow bottom and right side of the window
303
-			except for listboxes and textedit which follow all sides.
304
-	"All" = follow all sides (widgets resize)
305
-	"None" = follow the top and the left side (equals "top, left")
306
-  -OR- Layout$ is a combination of a horizontal and a vertical command (e.g. "Right, Top" etc.).
307
-  Horizontal:
308
-	"Left" = follow left side (default, when no other horizontal layout is given)
309
-	"Right" = follow the right side
310
-	"Left, Right" = follow the left and the right side (resize)
311
-	"H-Center" = follow the horizontal center
312
-  Vertical:
313
-	"Top" = follow the top side (default, when no other vertical layout is given)
314
-	"Bottom" = follow the bottom side
315
-	"Top, Bottom" = follow the top and bottom side (resize)
316
-	"V-Center" = follow the vertical center
317
-
318
-LISTBOX x1,y1 TO x2,y2, ID$, ScrollbarType, View$
319
-  Adds an empty listbox at (x1,y1) to (x2,y2) known as ID$ and with a ScrollbarType on View$.
320
-  ScrollbarType:
321
-	0 = none
322
-	1 = vertical scrollbars
323
-	2 = horizontal scrollbars
324
-	3 = vertical & horizontal scrollbars
325
-LISTBOX ADD ListBox$, Item$
326
-  Add the item Item$ to the listbox; note: this replaces ITEM ADD, which is obsolete and will be removed.
327
-LISTBOX ADD ListBox$, Position, Item$
328
-  Add the item Item$ at the position Position.
329
-LISTBOX CLEAR ListBox$
330
-  removes all entries in ListBox$.
331
-n = LISTBOX COUNT ListBox$
332
-  Count the number of entries in the list box ListBox$
333
-Entry$ = LISTBOX GET$ ListBox$, Row
334
-  Returns the Entry$ of Row in ListBox$.
335
-LISTBOX REMOVE ListBox$, Item$
336
-  Removes an item Item$ from the Listbox ID$.
337
-LISTBOX REMOVE ListBox$, Position
338
-  Remove the item at position Position.
339
-LISTBOX SELECT ListBox$, Position
340
-  Select the item at position Position.
341
-  Position = 0 means deselect
342
-LISTBOX SORT Listbox$
343
-  Sort the entries of ListBox$ alphabetically.
344
-LOCALIZE Mimetype$
345
-  Initialize automatic translation and use the locale mimetype Mimetype$. See also the Localizer help program.
346
-LOCALIZE STOP
347
-  Turn automatic translation off.
348
-LOCALIZE
349
-  Turn automatic translation on again.
350
-
351
-
352
--= M =-
353
-
354
-MENU Head$, Menu$, Shortcut$, View$
355
-  Add a menu to the menubar with the menu head Head$, the menu item Menu$ and the shortcut Shortcut$ 
356
-  on View$.
357
-  Shortcut$ can contain the following modifiers at the beginning and the shortcut character at the end:
358
-  Modifiers$+ShortcutCharacter$
359
-  "S" for the shift key
360
-  "C" for the control key
361
-  "O" for the option key (on most keyboards probably the Windows button)
362
-  These modifiers can be combined, but the following combinations do not work:
363
-  "SO", "SC" and "SCO"
364
-  Note: The command key (ALT) is always part of the shortcut.
365
-MENU SET MenuHead$, SetRadioMode, View$
366
-  Put the menu in radio mode, so up to one item is marked.
367
-  Note: you have to set the first marked item yourself.
368
-MENU SET MenuHead$, MenuItem$, Option$, View$
369
-  Enable/Disable or mark/unmark or remove a menu item.
370
-  Option$ = "Disable|Enable|Mark|Plain|Remove"
371
-Translation$ = MENU TRANSLATE$(Source$)
372
-  Translation$ holds the translation of Source$. Different to TRANSLATE$, the Source$ is splitted at colons : and
373
-  and the string parts are translated separatly. This is useful for comparing translated menu messages.
374
-  E.g.
375
-  if(myMenuMessage$ = menu translate$("File:Open")) ... 
376
-msg$ = MESSAGE$
377
-  Collects the messages generated by the GUI elements.
378
-Arrived = MESSAGE SEND Application$, Message$
379
-  Send a string to the yab application with signature Application$
380
-  (default signature is: "application/x-vnd.yab-app", you can change the signature when you add
381
-  a comment in the first or second line of your program like this:
382
-    // mimetype "application/x-vnd.myapp"
383
-  Note: this does not work for bound programs currently!)
384
-  The destination yab application will produce a message$ stating:
385
-    _Scripting:...|
386
-  where the ... are the Message$.
387
-  The command returns one of the following error codes:
388
-   0: Message was delivered
389
-   1: The destination program was not found
390
-   2: The target's message queue is full
391
-   3: Time out, the message never made it to the target
392
-   4: An other error occurred
393
-mouse$ = MOUSE MESSAGE$(View$)
394
-  Returns the state of the mouse related to View$.
395
-  It consists out of X:Y:LMB:MMB:RMB (where MB is the corresponding left, middle, right mousebutton).
396
-mouse$ = MOUSE MESSAGE$
397
-  Returns the state of the mouse related to the application.
398
-  It consists out of VIEW:X:Y:LMB:MMB:RMB (where VIEW is the View$ the mouse is over, MB is the 
399
-  corresponding left, middle, right mousebutton).
400
-MOUSE SET Option$
401
-  Hide or show the mouse cursor for this application.
402
-  Option$ = "Hide" -- hide the mouse cursor
403
-  Option$ = "Show" -- show the mouse cursor
404
-  Option$ = "Obscure" -- hide the mouse cursor until the mouse is moved
405
-
406
-
407
--= O =-
408
-
409
-OPTION SET View$, "Auto-Resize"
410
-  Automatically resize the view View$ to preferred (when this is supported by the view).
411
-OPTION SET View$, "Focus", HasFocus
412
-  Set/remove the focus of View$ (when this is supported by the view).
413
-OPTION SET Control$, "Enabled", IsEnabled 
414
-  Enable/disable the control Control$.
415
-OPTION SET Control$, "Label", NewLabel$
416
-  Give a Control a new label.
417
-OPTION SET Control$, "Visible", IsVisible
418
-  Set the control Control$ unvisible or visible
419
-  Note: The following widgets are controls:
420
-  CHECKBOX, RADIOBUTTON, SLIDER, TEXTCONTROL, BUTTON, COLORCONTROL, SPINCONTROL, CALENDAR
421
-OPTION COLOR View$, "BGColor", r,g,b
422
-  Set the background color of any view (note: this is different to DRAW SET!)
423
-
424
-
425
--= P =-
426
-
427
-x = PEEK("DesktopWidth")
428
-  Returns the current X-resolution of the current desktop
429
-y = PEEK("DesktopHeight")
430
-  Returns the current Y-resolution of the current desktop
431
-x = PEEK("Deskbar-x")
432
-  Returns the position of the left side of the Deskbar
433
-y = PEEK("Deskbar-y")
434
-  Returns the position of the top side of the Deskbar
435
-w = PEEK("DeskbarWidth")
436
-  Returns the height of the Deskbar
437
-h = PEEK("DeskbarHeight")
438
-  Returns the width of the Deskbar
439
-p = PEEK("Deskbarposition")
440
-  Returns the position of the Deskbar as follows (clockwise):
441
-  1 = top-left
442
-  2 = top
443
-  3 = top-right
444
-  4 = bottom-right
445
-  5 = bottom
446
-  6 = bottom-left
447
-i = PEEK("Deskbarexpanded")
448
-  Returns true if the Deskbar is expanded (only possibe in position 1 and 3) and false if not.
449
-Height = PEEK("menuheight")
450
-  Returns the height of the menu (which is related to the user's font settings). 
451
-  This returns the height only when any window already has a menu, otherwise it returns -1.
452
-Width = PEEK("scrollbarwidth")
453
-  Returns the width of the scrollbars.
454
-  Different to "menuheight", it returns the correct width even if no scrollbars are used.
455
-Height = PEEK("tabheight")
456
-  Returns the height of the tabfield.
457
-Directory$ = PEEK$("directory")
458
-  Returns application directory. Use this in the following way:
459
-  if (peek("isbound")) then
460
-	Directory$ = peek$("directory")
461
-  else
462
-	Directory$ = system$("pwd")
463
-  endif
464
-	see also ATTRIBUTE GET$
465
-TrackerItem$ = PEEK$("refsreceived")
466
-  Returns TrackerItem which you used 'open with...' your application on.
467
-Selected$ = POPUPMENU x,y, MenuItems$, View$
468
-  Pop up a menu at position (x,y) on View$ with the menu items MenuItems$ which are separated
469
-  by "|". Waits until an item is selected and returns it's label as Selected$.
470
-PRINTER SETUP SetupFile$
471
-  Setup the printing enviroment and store it in file named SetupFile$.
472
-PrintingError = PRINTER JobName$, SetupFile$, View$
473
-  Load the settings from SetupFile$ (or ask for them when the file is invalid) and print
474
-  the view View$ as the job named JobName$.
475
-  Note: Alpha transparency is not printed correctly!
476
-  Note: Due to a bug in BeOS and ZETA, there are probably problems printing CHECKBOX IMAGE and
477
-  BUTTON IMAGE images, use DRAW IMAGE instead!
478
-  Note: currently untested in Haiku
479
-  Error codes for PrintingError:
480
-    0 = No Problems
481
-    1 = Page setup failed (probably communication problems with the print server)
482
-    2 = The configuration file was loaded but page setup failed
483
-    3 = The view View$ was not found
484
-    4 = The number of pages is 0 or less
485
-    5 = The printing was canceled or something went wrong with printing
486
-  Note: PrintingError = 4 can happen because of a bug in the PDF printing driver; although
487
-  a page size is shown, none is selected. If this happens, you may want to call a PRINTER SETUP
488
-  for the user and try to print again.
489
-  Note: When an error with code 1,2,3 or 4 occurs, you can be shure that nothing was sent to the printer yet.
490
-
491
-
492
--= R =-
493
-
494
-RADIOBUTTON x1,y1, ID$, Label$, IsActivated, View$
495
-  Add a radio button at (x1,y1) and Label$ on View$. If isActivated is set to 0, the radio button is 
496
-  off else it is on. Radio buttons should be grouped together in one view.
497
-RADIOBUTTON SET RadioButton$, IsActivated
498
-  (De-)Activate the radio button RadioButton$.
499
-
500
-
501
--= S =-
502
-
503
-SCREENSHOT x1, y1 to x2, y2, Bitmap$
504
-  Takes a screenshot and copies the specified region of the desktop onto Bitmap$, which will be created!
505
-SCROLLBAR ID$, ScrollbarType, View$
506
-  Make View$ scrollable.
507
-SCROLLBAR SET Scrollbar$, Borderoption$
508
-  Borderoption$ = "no-border" or "plain-border" or "fancy-border" (default)
509
-SCROLLBAR SET Scrollbar$, "Vertical Position", Position
510
-SCROLLBAR SET Scrollbar$, "Horizontal Position", Position
511
-  Set the scrollbar to the position Position. Default is (0,0).
512
-SCROLLBAR SET Scrollbar$, "Vertical Range", Min, Max
513
-SCROLLBAR SET Scrollbar$, "Horizontal Range", Min, Max
514
-  Set the scrollbars to a maximum range, default is (1000,1000).
515
-  Note: the Max value will be added to the view's actual width/height.
516
-SCROLLBAR SET Scrollbar$, "Vertical Steps", SmallSteps, BigSteps
517
-SCROLLBAR SET Scrollbar$, "Horizontal Steps", SmallSteps, BigSteps
518
-  Set the scrollbar steps. 
519
-  SmallSteps are the scrolling steps when the user clicks on the arrow buttons (default is 1.0).
520
-  BigSteps are the scrolling steps when the user clicks on the empty part of the scrollbar (default is 10.0).
521
-Position = SCROLLBAR GET Scrollbar$, "Horizontal"
522
-Position = SCROLLBAR GET Scrollbar$, "Vertical"
523
-  Get the current position of the scrollbars.
524
-SHORTCUT View$, Shortcut$, MyMessage$
525
-  Set a key Shortcut$ on View$, giving back the Message$ when used.
526
-  This is comparable to the shortcuts used in menus, but NOTE:
527
-  in opposite to a menu, you can't use command -X, -C, -V, -A, -W, -Q !
528
-SLIDER x1,y1 TO x2,y2, ID$, Label$, Min, Max, View$
529
-  Add a slider with a minimum and and a maximum value (Min, Max).
530
-SLIDER x1,y1 TO x2,y2, ID$, Label$, Min, Max, Option$, View$
531
-  Option$ = "block/triangle, horizontal/vertical"
532
-SLIDER LABEL Slider$, StartLabel$, EndLabel$
533
-  Set start and end limit labels
534
-SLIDER SET Silder$, Location$, Count
535
-  Set the hashmarks.
536
-  Note: The Zeta sliders do not distinguish between top/bottom/left/right marks, just use "both"
537
-  Location$ = "none/bottom/top/both" use hashmarks for horizontal sliders
538
-  Location$ = "none/left/rigth/both" use hashmarks for vertical sliders
539
-  Count = number of hashmarks
540
-SLIDER COLOR Silder$, Part$, r,g,b
541
-  Part$ = "barcolor"
542
-  Part$ = "fillcolor"
543
-SLIDER SET Silder$, Value
544
-  Set the slider to Value.
545
-Value = SLIDER GET Slider$
546
-  Get the currently selected value of the slider.
547
-ID = SOUND PLAY SoundFile$
548
-  Play the sound file SoundFile$ (can be anything like wav, mp3, etc.).
549
-  You are given an ID to handle the playback later in your code.
550
-  Note: Currently not supported by Haiku!
551
-SOUND STOP ID
552
-  Stop the sound with ID
553
-SOUND WAIT ID
554
-  Waits until the sound with ID is finished playing.
555
-SPINCONTROL x,y, ID$, Label$, Min, Max, Step, View$
556
-  Set a spin control for the range (Min,Max), counting by Step.
557
-SPINCONTROL SET SpinControl$, Value
558
-  Set the spin control SpinControl$ to Value.
559
-Value = SPINCONTROL GET SpinControl$
560
-  Get the current spin control value.
561
-SPLITVIEW x1,y1 TO x2,y2, ID$, IsVerticalSplit, NormalStyle, View$
562
-  Set up the new view ID$ and split it into two new views ID$+"1" and ID$+"2".
563
-  If IsVerticalSplit = true, a vertical splitter is set,
564
-  if IsVerticalSplit = false, a horizontal splitter is set.
565
-  If NormalStyle = true, the splitter is 10 pixels thick,
566
-  If NormalStyle = false, the splitter is 4 pixels thick.
567
-SPLITVIEW SET SplitView$, "Divider", Position
568
-  Set the position of the divider, default is the half of the total split view.
569
-SPLITVIEW SET SplitView$, "MinimumSizes", LeftOrTop, RightOrBottom
570
-  Set the minimum sizes of the left (or top) view and the right (or bottom) view.
571
-Position = SPLITVIEW GET SplitView$, "Divider"
572
-  Get the current position of the divider.
573
-STACKVIEW x1,y1 TO x2,y2, ID$, NumberOfViews, View$
574
-  Set up a stack of views where only one is always visible.
575
-STACKVIEW SET StackView$, ViewNumber
576
-  Set the view number ViewNumber as the visible view.
577
-ViewNumber = STACKVIEW GET StackView$
578
-  Get the current number of the visible view.
579
-STATUSBAR x1, y1 to x2, y2, ID$, Label1$, Label2$, View$
580
-  Creates a statusbar with ID$ and label(s) on View$.
581
-  Label1$ is on the left side above the actual bar and so is Label2$ on the right.
582
-STATUSBAR SET ID$, Label1$, Label2$, State
583
-  Sets Statusbar ID$ to State and changes the Labels to specified ones.
584
-STATUSBAR SET ID$, r, g, b
585
-  Set the color of the statusbar
586
-STATUSBAR SET ID$, BarHeight
587
-  Set the height of the statusbar
588
-SUBMENU MenuHead$, MenuItem$, SubMenuItem$, Modifier$, View$
589
-  This is the same as MENU, it just adds a submenu instead. Deeper leveling is not possible
590
-  in yab, as a deeper menu structure would be bad style anyway.
591
-SUBMENU SET MenuHead$, MenuItem$, SetRadioMode, View$
592
-  Put the submenu in radio mode, so up to one item is marked.
593
-  Note: you have to set the first marked item yourself.
594
-SUBMENU SET MenuHead$, MenuItem$, SubMenuItem$, Option$, View$
595
-  Enable/Disable or mark/remove a submenu item.
596
-  Option$ = "Disable|Enable|Mark|Plain|Remove"
597
-
598
-
599
--= T =-
600
-
601
-TABVIEW x1,y1 TO x2,y2, ID$, Option$, View$
602
-  Option$ = "top, bottom, left, right" where to place the tabs.
603
-TABVIEW ADD TabView$, TabName$
604
-  For each tab, a new view is created; you can add widgets or draw on these views as ususal.
605
-  The ids for the views ist TabView$+"1" for the first, TabView$+"2" for the second view, etc.
606
-TABVIEW SET TabView$, TabNumber
607
-  Open the tab number TabNumber.
608
-TabNumber = TABVIEW GET TABVIEW$
609
-  Get the current opened tab. 
610
-TEXT x,y, ID$, Text$, View$
611
-  Displays Text$ at position (x,y) on View$. This cannot be flushed like DRAW TEXT and is meant for
612
-  permanent labels.
613
-TEXT x1,y1 TO x2,y2, ID$, Text$, View$
614
-  Displays Text$ on View$. This cannot be flushed like DRAW TEXT and is meant for permanent labels.
615
-  Furthermore you can set the alignment for this command with the TEXT SET command.
616
-TEXT SET Text$, Alignment$
617
-  Set the alignment of Text$ to either "align-left", "align-center" or "align-right".
618
-TEXTCONTROL x1,y1 TO x2,y2, ID$, Label$, Text$, View$
619
-  Opens a textcontrol from (x1,y1) to (x2,y2) with Label$ and preset Text$ on View$
620
-TEXTCONTROL SET TextControl$, Text$
621
-  Set the text control's text to Text$.
622
-TEXTCONTROL SET TextControl$, IsPassword 
623
-  IsPassword = false Normal typing
624
-  IsPassword = true Hide typing
625
-TEXTCONTROL SET TextControl$, Option$, Value$
626
- Option$="align" Value$= "left" / "right" / "center"
627
- Option$="exclude", Value$=characters to disallow.
628
- Option$="include", Value$=characters to allow.
629
- Option$="length", Value$=str$(number) of characters allowed.
630
-  Sets the font used to the system fixed font.
631
- Option$="type"
632
-  Value$="number" Only allow  to characters 0-9 and  ".", full stop.
633
-  Value$=""alphanumeric" allow all characters.
634
- Option$="focus" Value$ = "true" / "false" Set the focus of TextControl$.
635
- Option$="Cursor", Value$=str$(number) positions the cursor, sets the focus to true.
636
-TEXTCONTROL CLEAR TextControl$
637
-  Delete the text of the text control.
638
-Text$ = TEXTCONTROL GET$ TextControl$
639
-  Get the entry of the text control TextControl$. Even works, when Return was not pressed.
640
-TEXTEDIT x1,y1 TO x2,y2, ID$, ScrollbarType, View$
641
-  Opens an editor at (x1,y1) to (x2,y2) with ID$ (not displayed) on View$. For the 
642
-  scrollbartypes look at the listbox entry.
643
-  TEXTEDIT also follows all sides in standard layout.
644
-TEXTEDIT ADD TextEdit$, Text$
645
-  Insert Text$ in the textedit TextEdit$ on View$.
646
-TEXTEDIT CLEAR TextEdit$
647
-  Clears the text from the textedit TextEdit$ on View$. 
648
-EnteredText$ = TEXTEDIT GET$ TextEdit$
649
-  EnteredText$ holds the text of the textedit ID$ on View$
650
-SelectedText$ = TEXTEDIT GET$ TextEdit$, Option$
651
-  Returns the current selected text, can be empty of course.
652
-  Option$ = "Selection"
653
-TextLine$ = TEXTEDIT GET$ TextEdit$, LineNumber
654
-Width = TEXTEDIT GET TextEdit$, "Line-Width", LineNumber
655
-Height = TEXTEDIT GET TextEdit$, "Line-Height", LineNumber
656
-LineNumber = TEXTEDIT GET TextEdit$, Option$, Search$
657
-  LineNumber = Option$ = "Find", Search$
658
-  LineNumber = Option$ = "Case-Sensitive-Find", Search$
659
-LineNumber = TEXTEDIT GET TextEdit$, Option$
660
-  IsChanged = Option$ = "hasChanged"
661
-  LineNumber = Option$ = "countlines" -- /n characters
662
-  LineNumber = Option$ = "countphysicallines" -- displayed lines
663
-  LineNumber = Option$ = "currentline"
664
-  YOffset = Option$ = "vertical-scrollbar"
665
-  XOffset = Option$ = "horizontal-scrollbar"
666
-  Position = Option$ = "cursor-position"
667
-  TextLength = Option$ = "textlength"
668
-TEXTEDIT SET TextEdit$, Option$
669
-  Applys an option to the textedit TextEdit$ on View$.
670
-  Option$ = "cut, copy, paste, clear, select-all, undo"
671
-TEXTEDIT SET TextEdit$, Option$, Value
672
-  Option$ = "autoindent", true/false
673
-  Option$ = "wordwrap", true/false
674
-  Option$ = "editable", true/false
675
-  Option$ = "color-case-sensitive", true/false
676
-  Options = "Cursor", ofset
677
-  Option$ = "changed", true/false
678
-  Option$ = "gotoline", LineNumber
679
-  Option$ = "select", LineNumber
680
-  Option$ = "tabwidth", TabWidth
681
-  Option$ = "textwidth", TextWidth
682
-  Option$ = "autocomplete-start"
683
-  Option$ = "has-autocompletion"
684
-  Option$= "align", left/center/right
685
-  Option$= "focus", true/false
686
-  Default options are:
687
-    autoindent = false
688
-    wordwrap = true
689
-    editable = true
690
-    color-case-sensitive = false
691
-    changed = false
692
-    has-autocompletion = true
693
-    autocomplete-start = 4
694
-    align = left
695
-TEXTEDIT SET TextEdit$, Option$, Value$
696
-  Option$ = "autocomplete"
697
-  Add a word Value$ to the auto-completion list.
698
-  Option$ = "font"
699
-  Set the font to Value$ (similar to DRAW SET); default is "system-plain"
700
-  Option$="align" value$= "left | center | right" Sets the alignment for text in the textedit view.
701
-  Option$ = "plain | bold |fixed" valu$=str$(point_size) Sets the font face to system plain | bold | fixed font and sets the size to point_size
702
-TEXTEDIT COLOR TextEdit$, Option$, Command$
703
-  Option$ = "color1, color2, color3, color4, char-color", Command$
704
-  Add the command Command$ to the list of words that are checked for syntax highlighting
705
-  The char-color behaves differently and highlights only the first character of Command$
706
-  (this happens after the highlighting of the other colors).
707
-TEXTEDIT COLOR TextEdit$, Option$, r,g,b
708
-  Option$ = "bgcolor, textcolor, color1, color2, color3, color4, char-color", r,g,b
709
-  Default colors are:
710
-    bgcolor = 255,255,255 (white)
711
-    textcolor = 0,0,0 (black)
712
-    color1 = 0,0,255 (blue)
713
-    color2 = 255,0,0 (red)
714
-    color3 = 0,250,0 (green)
715
-    color4 = 185,185,185 (gray)
716
-    char-color = 200,0,255 (magenta)
717
-TEXTURL x,y, ID$, Label$, Address$, View$
718
-  Set the web/email/ftp address at (x,y) with the label Label$ and the url Address$.
719
-  This widget is quite nice, it launches the appropriate application when clicked, it supports
720
-  a right-click popup-menu and you can drag the url to create either a person file or a bookmark.
721
-  Email can be either of the style: "mailto:foo@bar.com" or just "foo@bar.com"
722
-  A web url starts either with "http://", "https://" or with "file://"
723
-  And a ftp address starts with "ftp://"
724
-TEXTURL COLOR TextURL$, Option$, r,g,b
725
-  Set the colors for the URL. Valid options are:
726
-  "Label" for the color of the label,
727
-  "Click" for the color of the label, when clicked and
728
-  "Mouse-over" for the color of the label, when the mouse is moved over the label.
729
-Id = THREAD GET Option$, Program$
730
-  Option$ = "TeamID" returns the team ID for the program named Program$
731
-    Specify the whole path with parameters (only the first 64 characters are important)
732
-    for the team, the first team with this path and parameters will be returned.
733
-  Option$ = "ThreadID" returns the thread ID for the program named Program$
734
-    Specify the program name, the first thread with this name will be returned.
735
-  Returns -1 when the program was not found.
736
-Success = THREAD REMOVE Option$, ID
737
-  Option$ = "TeamID" kills the team with number ID
738
-  Option$ = "ThreadID" kills the thread with number ID
739
-  Returns True when successful and False otherwise.
740
-  Note: You can crash your system with this command! If you don't know what this command is meant for,
741
-  then don't use it!     
742
-TOOLTIP View$, Text$
743
-  Set Text$ as the tooltip information for any Widget or View View$.
744
-  Set Test$ = "" to remove the tooltip again.
745
-TOOLTIP COLOR "bgcolor/textcolor", r,g,b
746
-  Set the background/text color of all tooltips to r,g,b. Note: This is currently not supported.
747
-Translation$ = TRANSLATE$(Source$)
748
-  Translation$ holds the translation of Source$
749
-TREEBOX x1,y1 to x2,y2, ID$, ScrollbarType, View$
750
-  Adds a tree box. This behaves just like a LISTBOX but is able to show nested trees.
751
-  Note: ITEM ADD does not work here. Use TREEBOX ADD instead. ITEM ADD will be depricated in
752
-  one of the next releases.
753
-TREEBOX ADD TreeBox$, RootItem$
754
-  Add the item RootItem$ to the top level of the tree.
755
-TREEBOX ADD TreeBox$, HeadItem$, ListItem$, IsExpanded
756
-  Add the item ListItem$ under the level of HeadItem$ of the tree.
757
-TREEBOX CLEAR TreeBox$
758
-  Clear the tree.
759
-TREEBOX REMOVE TreeBox$, ListItem$
760
-  Removes the first list item ListItem$ from the tree. Note: this also removes all subitems!
761
-n = TREEBOX COUNT TreeBox$
762
-  Returns the number of entries in TreeBox$
763
-Item$ = TREEBOX GET$ TreeBox$, Position
764
-  Returns the Item$ at position Position in TreeBox$.
765
-TREEBOX EXPAND TreeBox$, Head$
766
-  Expands Head$ in TreeBox$.
767
-TREEBOX COLLAPSE TreeBox$, Head$
768
-  Collapses Head$ in TreeBox$.
769
-TREEBOX REMOVE TreeBox$, Position
770
-  Removes the entry at position Position in TreeBox$.
771
-TREEBOX REMOVE TreeBox$, Head$, ListItem$
772
-  Removes ListItem$ under Head$ in TreeBox$.
773
-TREEBOX SELECT TreeBox$, Position
774
-  Selects theitem at position Position in TreeBox$.
775
-TREEBOX SORT TreeBox$
776
-  Sorts the entries of TreeBox$ alphabetically.
777
-
778
-
779
--= V =-
780
-
781
-VIEW x1,y1 TO x2,y2, ID$, View$
782
-  Adds a view
783
-VIEW DROPZONE View$
784
-  Define View$ as a drop zone that accepts dropped files.
785
-  DROPZONE now accepts multiple files (and sends them in inversed order as message)
786
-VIEW REMOVE View$
787
-  Remove View$. The window view cannot be removed. Should be much more stable now.
788
-  Warning: Currently clears all internal information about menues and drop boxes. It is only safe to
789
-  use it, when you don't have any menues or drop boxes on views that will not be removed.
790
-  Warning: Never remove menus with shortcuts, otherwise yab will crash when the shortcut key is pressed!
791
-Result = VIEW GET View$, Option$
792
-  Option$ = "Position-X/Position-Y/Width/Height/Exists/Focused"
793
-  Returns the requested property or if used with Exists/Focused returns 1 if so and 0 if not.
794
-
795
-
796
--= W =-
797
-
798
-WINDOW OPEN x1,y1 TO x2,y2, ID$, Title$ 
799
-  Open window at position x1,y1 to x2,y2 in screen coordinates with title Title$.
800
-  Automatically generates a window-sized view called ID$.
801
-WINDOW CLOSE WindowView$
802
-  Closes window containing the view View$. Warning: this might destabilize your program if you try
803
-  to reconstruct your old window or further use old views! The yab-taskforce is set on the tracks of
804
-  this bug ;)
805
-n = WINDOW COUNT
806
-  Returns the number of open windows
807
-Result = WINDOW GET View$, Option$
808
-  Option$ = "Position-X/Position-Y/Width/Height/Minimum-Width/Minimum-Height/Maximum-Width/Maximum-Height/Exists/Minimized-To-Deskbar"
809
-  Returns the requested property or if used with Exists/Minimized-To-Deskbar returns 1 if true and 0 if not.
810
-WINDOW SET Window$, Option$, Value$
811
-  "Look", "Document/Titled(default)/Floating/Modal/Bordered/No-Border"
812
-  "Feel", "Normal(default)/Modal-App/Modal-All/Floating-App/Floating-All"
813
-  See "BeBook->Interface Kit->BWindow->Constants and Defined Types" for details.
814
-  "Title", Title$
815
-  "Flags", "Not-Closable, Not-Zoomable, Not-Minimizable, Not-H-Resizable, Not-V-Resizable, 
816
-            Not-Resizable, No-Workspace-Activation, Accept-First-Click"
817
-  See "BeBook->Interface Kit->BWindow->Constants and Defined Types" for details.
818
-  "Flags", "Reset"
819
-  Resets the flags back to none.
820
-  "Workspace", "All"
821
-  Causes the window to appear on all workspaces.
822
-  "Workspace", "Current"
823
-  Causes the window to appear on only the current workspace.
824
-  "Workspace", "n"  (where n is a number >= 1)
825
-  Causes the window to appear on workspace number n
826
-
827
-WINDOW SET Window$, Option$, x,y
828
-  "ResizeTo", x,y
829
-  "MoveTo", x,y
830
-  "MinimumTo", x,y
831
-  "MaximumTo", x,y
832
-WINDOW SET WindowView$, Option$
833
-  Option$ = "Activate"
834
-    Activate the window, so it is in the foreground.
835
-  Option$ = "Deactivate"
836
-    Deactivate the window, so it is in the background.
837
-  Option$ = "Minimize"
838
-    Minimize the window, or restore the window if it is already minimized.
839
-  Option$ = "Maximize"
840
-    Maximize (zoom) the window.
841
-  Option$ = "Enable-Updates"
842
-    Updates the window again after a "Disable-Updates". 
843
-  Option$ = "Disable-Updates"
844
-    Disables the automatic window updates.
845 0
deleted file mode 100644
... ...
@@ -1,2664 +0,0 @@
1
-<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Yabasic</title><meta name="generator" content="DocBook XSL Stylesheets V1.45"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book"><div class="titlepage"><div><h1 class="title"><a name="id2787149"></a>Yabasic</h1></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>1. <a href="#chapter_intoduction">Introduction</a></dt><dd><dl><dt><a href="#id2787120">About this document</a></dt><dt><a href="#id2774095">About yabasic</a></dt></dl></dd><dt>2. <a href="#chapter_program_windows">The yabasic-program under Windows</a></dt><dd><dl><dt><a href="#id2726116">Starting yabasic</a></dt><dt><a href="#id2726405">Options</a></dt><dt><a href="#id2726920">The context Menu</a></dt></dl></dd><dt>3. <a href="#chapter_program_unix">The yabasic-program under Unix</a></dt><dd><dl><dt><a href="#id2727075">Starting yabasic</a></dt><dt><a href="#id2724578">Options</a></dt><dt><a href="#id2725188">Setting defaults</a></dt></dl></dd><dt>4. <a href="#chapter_topics">Some features of yabasic, explained by topic</a></dt><dd><dl><dt><a href="#id2725301"><tt>print</tt>, <tt>input</tt> and others</a></dt><dt><a href="#id2725430">Control statements: loops, <tt>if</tt> and <tt>switch</tt></a></dt><dt><a href="#id2787458">Drawing and painting</a></dt><dt><a href="#id2787636">Reading from and writing to files</a></dt><dt><a href="#id2787742">Subroutines and Libraries</a></dt><dt><a href="#id2787834">String processing</a></dt><dt><a href="#id2787987">Arithmetic</a></dt><dt><a href="#id2788126">Data and such</a></dt><dt><a href="#id2788182">Other interesting commands.</a></dt></dl></dd><dt>5. <a href="#chapter_topics_list">All commands and functions of yabasic listed by topic</a></dt><dd><dl><dt><a href="#top_numbers">Number processing and conversion</a></dt><dt><a href="#top_conditions">Conditions and control structures</a></dt><dt><a href="#top_data">Data keeping and processing</a></dt><dt><a href="#top_strings">String processing</a></dt><dt><a href="#top_io">File operations and printing</a></dt><dt><a href="#top_sub">Subroutines and libraries</a></dt><dt><a href="#top_other">Other commands</a></dt><dt><a href="#top_graphics">Graphics and printing</a></dt></dl></dd><dt>6. <a href="#chapter_ref_words">All commands and functions of yabasic grouped alphabetically</a></dt><dd><dl><dt><a href="#ref_a">A</a></dt><dt><a href="#ref_b">B</a></dt><dt><a href="#ref_c">C</a></dt><dt><a href="#ref_d">D</a></dt><dt><a href="#ref_e">E</a></dt><dt><a href="#ref_f">F</a></dt><dt><a href="#ref_g">G</a></dt><dt><a href="#ref_h">H</a></dt><dt><a href="#ref_i">I</a></dt><dt><a href="#ref_l">L</a></dt><dt><a href="#ref_m">M</a></dt><dt><a href="#ref_n">N</a></dt><dt><a href="#ref_o">O</a></dt><dt><a href="#ref_p">P</a></dt><dt><a href="#ref_r">R</a></dt><dt><a href="#ref_s">S</a></dt><dt><a href="#ref_t">T</a></dt><dt><a href="#ref_u">U</a></dt><dt><a href="#ref_v">V</a></dt><dt><a href="#ref_w">W</a></dt><dt><a href="#ref_x">X</a></dt><dt><a href="#ref_special_characters">Special characters</a></dt></dl></dd><dt>7. <a href="#chapter_ref_concepts">A grab-bag of some general concepts and terms</a></dt><dd><dl><dt><a href="#ref_logical_shortcuts">Logical shortcuts</a></dt><dt><a href="#ref_conditions_and_expressions">Conditions and expressions</a></dt><dt><a href="#ref_array_references">References on arrays</a></dt><dt><a href="#ref_windows_filenames">Specifying Filenames under Windows</a></dt><dt><a href="#ref_escape_sequences">Escape-sequences</a></dt><dt><a href="#ref_standalone">Creating a <span class="emphasis"><i>standalone</i></span> program from your yabasic-program</a></dt></dl></dd><dt>8. <a href="#chapter_examples">A few example programs</a></dt><dd><dl><dt><a href="#id2827243">A very simple program</a></dt><dt><a href="#id2827270">A part of the demo of yabasic</a></dt></dl></dd><dt>9. <a href="#chapter_copyright">The Copyright of yabasic</a></dt></dl></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="chapter_intoduction"></a>Chapter 1. Introduction</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2787120">About this document</a></dt><dt><a href="#id2774095">About yabasic</a></dt></dl></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2787120"></a>About this document</h2></div></div><p>
2
-      This document describes yabasic.
3
-      You will find information about the yabasic 
4
-      interpreter (the program <b>yabasic</b> under Unix or 
5
-      <b>yabasic.exe</b> under Windows)
6
-      as well as the language itself.<p>
7
-    </p>
8
-      This document applies to version 2.750 of yabasic</p><p>
9
-      However, this document does not contain the latest news about yabasic or a FAQ.
10
-      As such information tends to change rapidly, it is presented online only 
11
-      at <a href="http://www.yabasic.de" target="_top">www.yabasic.de</a>.</p><p>
12
-      Although basic has its reputation as a language for beginning programmers,
13
-      this is not an introduction to programming at large. Rather this text assumes, that
14
-      the reader has some (moderate) experience with writing and starting computer programs.</p><p>
15
-    </p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2774095"></a>About yabasic</h2></div></div><p>yabasic is a traditional basic interpreter. It understands most of the typical basic-constructs, like <tt>goto</tt>, <tt>gosub</tt>, line numbers, <tt>read</tt>, <tt>data</tt> or string-variables with a trailing '<tt>$</tt>'. But on the other hand, yabasic implements some more advanced programming-constructs like subroutines or libraries (but <span class="emphasis"><i>not</i></span> objects). yabasic works much the same under Unix and Windows.</p><p>yabasic puts emphasis on giving results quickly and easily; therefore simple commands are provided to open a graphic window, print the graphics or control the console screen and get keyboard or mouse information. The example below opens a window, draws a circle and prints the graphic:</p><pre class="programlisting">
16
-open window 100,100
17
-open printer
18
-circle 50,50,40
19
-text 10,50,&quot;Press any key to get a printout&quot;
20
-clear screen
21
-inkey$
22
-close printer
23
-close window
24
-</pre><p>This example has fewer lines, than it would have in many other programming languages. In the end however yabasic lacks behind more advanced and modern programming languages like C++ or Java. But as far as it goes it tends to give you results more quickly and easily.</p></div></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="chapter_program_windows"></a>Chapter 2. The yabasic-program under Windows</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2726116">Starting yabasic</a></dt><dt><a href="#id2726405">Options</a></dt><dt><a href="#id2726920">The context Menu</a></dt></dl></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2726116"></a><a name="windows_starting"></a>Starting yabasic</h2></div></div><p>Once, yabasic has been set up correctly, there are three ways to start it:</p><div class="orderedlist"><ol type="1"><li><p><span class="emphasis"><i>Rightclick on your desktop:</i></span> The desktop menu appears with a submenu named <span class="emphasis"><i>new</i></span>. From this submenu choose yabasic. This will create a new icon on your desktop. If you rightclick on this icon, its <a href="#windows_context_menu">context menu</a> will appear; choose Execute to execute the program.</p></li><li><p>As a variant of the way described above, you may simply <span class="emphasis"><i>create a file with the ending <tt>.yab</tt></i></span> (e.g. with your favorite editor). Everything else then works as described above.</p></li><li><p><span class="emphasis"><i>From the start-menu:</i></span> Choose yabasic from your start-menu. A console-window will open and you will be asked to type in your program. Once you are finished, you need to type <tt>return</tt> twice, and yabasic will parse and execute your program.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This is <span class="emphasis"><i>not</i></span> the preferred way of starting yabasic ! Simply because the program, that you have typed, <span class="emphasis"><i>can not be saved</i></span> and will be lost inevitably ! There is no such thing as a <tt>save</tt>-command and therefore no way to conserve the program, that you have typed. This mode is only intended for quick hacks, and short programs.</p></div></li></ol></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2726405"></a><a name="windows_options"></a>Options</h2></div></div><p>Under Windows yabasic will mostly be invoked by double-clicking on an appropriate icon; this way you do not have a chance to specify any of the commandline options below. However, advanced users may add some of those options to the appropriate entries in the registry.</p><p>All the options below may be abbreviated, as long as the abbreviation does not become ambigous. For example, you may write <tt>-e</tt> instead of <tt>-execute</tt>.</p><div class="variablelist"><dl><dt><span class="term"><tt>-help</tt> or <tt>-?</tt></span></dt><dd><p>Prints a short help message, which itself describes two further help-options.</p></dd><dt><span class="term"><tt>-version</tt></span></dt><dd><p>Prints the version of yabasic.</p></dd><dt><span class="term"><tt>-geometry +<i><tt>X-POSITION</tt></i>+<i><tt>Y-POSITION</tt></i></tt></span></dt><dd><p>Sets the position of the graphic window, that is opened by <tt>open window</tt> (the <span class="emphasis"><i>size</i></span> of this window, of course, is specified within the <tt>open window</tt>-command). An example would be <tt>-geometry +20+10</tt>, which would place the graphic window 10 pixels below the upper border and 20 pixels right of the left border of the screen. This value cannot be changed, once yabasic has been started.</p></dd><dt><span class="term"><tt>-font <i><tt>NAME-OF-FONT</tt></i></tt></span></dt><dd><p>Name of the font, which will be used for graphic-text; can be any of <tt>decorative, dontcare, modern, roman, script, swiss</tt>. You may append a fontsize (measured in pixels) to any of those fontnames; for example <tt>-font swiss30</tt> chooses a swiss-type font with a size of 30 pixels.</p></dd><dt><span class="term"><tt>-bind <i><tt>NAME-OF-STANDALONE-PROGRAM</tt></i></tt></span></dt><dd><p>Create a standalone program (whose name is specified by <i><tt>NAME-OF-STANDALONE-PROGRAM</tt></i>) from the yabasic-program, that is specified on the commandline. See the section about <a href="#ref_standalone" title="Creating a standalone program from your yabasic-program">creating a <span class="emphasis"><i>standalone</i></span>-program</a> for details.</p></dd><dt><span class="term"><tt>-execute <i><tt>A-PROGRAM-AS-A-SINGLE-STRING</tt></i></tt></span></dt><dd><p>With this option you may specify some yabasic-code to be executed rigth away.This is useful for very short programs, which you do not want to save within a file. If this option is given, yabasic will not read any code from a file. Let's say, you have forgotten some of the square numbers between 1 and 10; in this case the command <tt>yabasic -e 'for a=1 to 10:print a*a:next a'</tt> will give you the answer immediately.</p></dd><dt><span class="term"><tt>-infolevel <i><tt>INFOLEVEL</tt></i></tt></span></dt><dd><p>Change the <span class="emphasis"><i>infolevel</i></span> of yabasic, where <i><tt>INFOLEVEL</tt></i> can be one of <tt>debug</tt>, <tt>note</tt>, <tt>warning</tt>, <tt>error</tt> and <tt>fatal</tt> (the default is <tt>warning</tt>). This option changes the amount of debugging-information yabasic produces. However, normally only the author of yabasic (<span class="emphasis"><i>me</i></span> !) would want to change this.</p></dd><dt><span class="term"><tt>-doc <i><tt>NAME-OF-A-PROGRAM</tt></i></tt></span></dt><dd><p>Print the <span class="emphasis"><i>embedded documentation</i></span> of the named program. The embedded documentation of a program consists of all the comments within the program, which start with the special keyword <tt><a href="#ref_doc" title="doc">doc</a></tt>. This documentation can also be seen by choosing the corresponding entry from the context-menu of any yabasic-program.</p></dd><dt><span class="term"><tt>-librarypath <i><tt>DIRECTORY-WITH-LIBRARIES</tt></i></tt></span></dt><dd><p>Change the directory, wherein libraries will be searched and imported (with the <tt><a href="#ref_import" title="import">import</a></tt>-command). See also <tt><a href="#ref_import" title="import">this entry</a></tt> for more information about the way, libraries are searched.</p></dd></dl></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2726920"></a><a name="windows_context_menu"></a>The context Menu</h2></div></div><p>Like every other icon under Windows, the icon of every yabasic-program has a <span class="emphasis"><i>context menu</i></span> offering the most frequent operations, that may be applied to a yabasic-program.</p><div class="variablelist"><dl><dt><span class="term">Execute</span></dt><dd><p>This will invoke yabasic to execute your program. The same happens, if you <span class="emphasis"><i>doubleclick</i></span> on the icon.</p></dd><dt><span class="term">Edit</span></dt><dd><p>notepad will be invoked, allowing you to edit your program.</p></dd><dt><span class="term">View docu</span></dt><dd><p>This will present the embedded documentation of your program. Embedded documentation is created with the special comment <tt><a href="#ref_doc" title="doc">doc</a></tt>.</p></dd></dl></div></div></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="chapter_program_unix"></a>Chapter 3. The yabasic-program under Unix</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2727075">Starting yabasic</a></dt><dt><a href="#id2724578">Options</a></dt><dt><a href="#id2725188">Setting defaults</a></dt></dl></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2727075"></a><a name="unix_starting"></a>Starting yabasic</h2></div></div><p>If your system administrator (vulgo <span class="emphasis"><i>root</i></span>) has installed yabasic correctly, there are three ways to start it:</p><div class="orderedlist"><ol type="1"><li><p>You may use your favorite editor (emacs, vi ?) to put your program into a file (e.g. <tt>foo</tt>). Make sure that the very first line starts with the characters '<tt>#!</tt>'  followed by the full pathname of yabasic (e.g. '<tt>#!/usr/local/bin/yabasic</tt>'). This <span class="emphasis"><i>she-bang</i></span>-line ensures, that your Unix will invoke yabasic to execute your program (see also the entry for the <a href="#ref_hash" title="#">hash</a>-character). Moreover, you will need to change the permissions of your yabasic-program <tt>foo</tt>, e.g. <tt>chmod u+x foo</tt>. After that you may invoke yabasic to invoke your program by simply typing <tt>foo</tt> (without even mentioning yabasic). However, if your <tt>PATH</tt>-variable does not contain a single dot ('<tt>.</tt>') you will have to type the full pathname of your program: e.g. <tt>/home/ihm/foo</tt> (or at least <tt>./foo</tt>).</p></li><li><p>Save your program into a file (e.g. <tt>foo</tt>) and type <tt>yabasic foo</tt>. This assumes, that the directory, where yabasic resides, is contained within your <tt>PATH</tt>-variable.</p></li><li><p>Finally your may simply type <b><tt>yabasic</tt></b> (maybe it will be necessary to include its full pathname). This will make yabasic come up and you will be asked to type in your program. Once you are finished, you need to type <tt>return</tt> twice, and yabasic will parse and execute your program.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This is <span class="emphasis"><i>not</i></span> the preferred way of starting yabasic ! Simply because the program, that you have typed, <span class="emphasis"><i>can not be saved</i></span> and will be lost inevitably ! There is no such thing as a <tt>save</tt>-command and therefore no way to conserve the program, that you have typed. This mode is only intended for quick hacks, and short programs, i.e. for using yabasic as some sort of fancy desktop calculator.</p></div></li></ol></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2724578"></a><a name="unix_options"></a>Options</h2></div></div><p>yabasic accepts a number of options on the commandline. All these options below may be abbreviated, as long as the abbreviation does not become ambigous. For example you may write <tt>-e</tt> instead of <tt>-execute</tt>.</p><div class="variablelist"><dl><dt><span class="term"><tt>-help</tt> or <tt>-?</tt></span></dt><dd><p>Prints a short help message, which itself describes two further help-options.</p></dd><dt><span class="term"><tt>-version</tt></span></dt><dd><p>Prints the version of yabasic.</p></dd><dt><span class="term"><tt>-fg <i><tt>FOREGROUND-COLOR</tt></i></tt> or <tt>-foreground <i><tt>FOREGROUND-COLOR</tt></i></tt></span></dt><dd><p>Define the foreground color for the graphics-window (that will be opened with <tt><a href="#ref_open_window" title="open window">open window</a></tt>). The usual X11 colornames, like <span class="emphasis"><i>red</i></span>, <span class="emphasis"><i>green</i></span>, &#8230; are accepted. This value cannot be changed, once yabasic has been started.</p></dd><dt><span class="term"><tt>-bg <i><tt>BACKGROUND-COLOR</tt></i></tt> or <tt>-background <i><tt>BACKGROUND-COLOR</tt></i></tt></span></dt><dd><p>Define the background color for the graphics-window. The usual X11 colornames are accepted. This value cannot be changed, once yabasic has been started.</p></dd><dt><span class="term"><tt>-geometry +<i><tt>X-POSITION</tt></i>+<i><tt>Y-POSITION</tt></i></tt></span></dt><dd><p>Sets the position of the graphic window, that is opened by <tt>open window</tt> (the <span class="emphasis"><i>size</i></span> of this window, of course, is specified with the <tt>open window</tt>-command). An example would be <tt>+20+10</tt>, which would place the graphic window 10 pixels below the upper border and 20 pixels right of the left border of the screen. Note, that the size of the window may not be specified here (well it may, but it will be ignored anyway). This value cannot be changed, once yabasic has been started.</p></dd><dt><span class="term"><tt>-display <i><tt>BACKGROUND-COLOR</tt></i></tt></span></dt><dd><p>Specify the <span class="emphasis"><i>display</i></span>, where the graphics window of yabasic should appear. Normally, however this value will be already present within the environment variable <tt>DISPLAY</tt>.</p></dd><dt><span class="term"><tt>-font <i><tt>NAME-OF-FONT</tt></i></tt></span></dt><dd><p>Name of the font, which will be used for text within the graphics window.</p></dd><dt><span class="term"><tt>-execute <i><tt>A-PROGRAM-AS-A-SINGLE-STRING</tt></i></tt></span></dt><dd><p>With this option you may specify some yabasic-code to be executed rigth away.This is useful for very short programs, which you do not want to save to a file. If this option is given, yabasic will not read any code from a file. E.g. <pre class="programlisting">yabasic -e 'for a=1 to 10:print a*a:next a'</pre> prints the square numbers from 1 to 10.
25
-</p></dd><dt><span class="term"><tt>-bind <i><tt>NAME-OF-STANDALONE-PROGRAM</tt></i></tt></span></dt><dd><p>Create a standalone program (whose name is specified by <i><tt>NAME-OF-STANDALONE-PROGRAM</tt></i>) from the yabasic-program, that is specified on the commandline. See the section about <a href="#ref_standalone" title="Creating a standalone program from your yabasic-program">creating a <span class="emphasis"><i>standalone</i></span>-program</a> for details.</p></dd><dt><span class="term"><tt>-infolevel <i><tt>INFOLEVEL</tt></i></tt></span></dt><dd><p>Change the <span class="emphasis"><i>infolevel</i></span> of yabasic where <i><tt>INFOLEVEL</tt></i> can be one of <tt>debug</tt>, <tt>note</tt>, <tt>warning</tt>, <tt>error</tt> and <tt>fatal</tt> (the default is <tt>warning</tt>). This option changes the amount of debugging-information yabasic produces. However, normally only the author of yabasic (<span class="emphasis"><i>me</i></span> !) would want to change this.</p></dd><dt><span class="term"><tt>-doc <i><tt>NAME-OF-A-PROGRAM</tt></i></tt></span></dt><dd><p>Print the <span class="emphasis"><i>embedded documentation</i></span> of the named program. The embedded documentation of a program consists of all the comments within the program, which start with the special keyword <tt><a href="#ref_doc" title="doc">doc</a></tt>.</p></dd><dt><span class="term"><tt>-librarypath <i><tt>DIRECTORY-WITH-LIBRARIES</tt></i></tt></span></dt><dd><p>Change the directory from which libraries will be imported (with the <tt><a href="#ref_import" title="import">import</a></tt>-command). See also this entry for more information about the way, libraries will be searched.</p></dd></dl></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2725188"></a><a name="unix_setting_defaults"></a>Setting defaults</h2></div></div><p>If you want to set some options <span class="emphasis"><i>once for all</i></span>, you may put them into your X-Windows resource file. This is usually the file <tt>.Xresources</tt> or some such within your home directory (type <b><tt>man X</tt></b> for details).</p><p>Here is a sample section, which may appear within this file:</p><pre class="programlisting">
26
-yabasic*foreground: blue
27
-yabasic*background: gold
28
-yabasic*geometry: +10+10
29
-yabasic*font: 9x15
30
-</pre><p>This will set the foreground color of the graphic-window to <span class="emphasis"><i>blue</i></span> and the background color to <span class="emphasis"><i>gold</i></span>. The window will appear at position <span class="emphasis"><i>10,10</i></span> and the text font will be <span class="emphasis"><i>9x15</i></span>.</p></div></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="chapter_topics"></a>Chapter 4. Some features of yabasic, explained by topic</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#id2725301"><tt>print</tt>, <tt>input</tt> and others</a></dt><dt><a href="#id2725430">Control statements: loops, <tt>if</tt> and <tt>switch</tt></a></dt><dt><a href="#id2787458">Drawing and painting</a></dt><dt><a href="#id2787636">Reading from and writing to files</a></dt><dt><a href="#id2787742">Subroutines and Libraries</a></dt><dt><a href="#id2787834">String processing</a></dt><dt><a href="#id2787987">Arithmetic</a></dt><dt><a href="#id2788126">Data and such</a></dt><dt><a href="#id2788182">Other interesting commands.</a></dt></dl></div><p>This chapter has sections for some of the major features of yabasic and names a few commands related with each area. So, depending on your interest, you find the most important commands of this area named; the other commands from this area may then be discovered through the links in the <span class="emphasis"><i>see also</i></span>-section.</p><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2725301"></a><tt>print</tt>, <tt>input</tt> and others</h2></div></div><p>The <tt><a href="#ref_print" title="print">print</a></tt>-command is used to put text on the text screen. Here, the term <i>text screen</i> stands for your terminal (under Unix) or the console window (under Windows).</p><p>At the bottom line, <tt>print</tt> simply outputs its argument to the text window. However, once you have called <tt><a href="#ref_clear_screen" title="clear screen">clear screen</a></tt> you may use advanced features like printing colors or copying areas of text with <tt><a href="#ref_getscreen" title="getscreen$()">getscreen$</a></tt> or <tt><a href="#ref_putscreen" title="putscreen">putscreen</a></tt>.</p><p>You may ask the user for input with the <tt><a href="#ref_input" title="input">input</a></tt>-command; use <tt><a href="#ref_inkey" title="inkey$">inkey$</a></tt> to get each key as soon as it is pressed.</p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2725430"></a>Control statements: loops, <tt>if</tt> and <tt>switch</tt></h2></div></div><p>Of course, yabasic has the <tt><a href="#ref_goto" title="goto">goto</a></tt>- and <tt><a href="#ref_gosub" title="gosub">gosub</a></tt>-statements; you may go to a <tt><a href="#ref_label" title="label">label</a></tt> or a <span class="emphasis"><i>line number</i></span> (which is just a special kind of label). <tt><a href="#ref_goto" title="goto">goto</a></tt>, despite its bad reputation ([<tt>goto</tt> considered harmful]), has still its good uses; however in many cases you are probably better off with loops like <tt><a href="#ref_repeat" title="repeat">repeat</a></tt>-<tt><a href="#ref_until" title="until">until</a></tt>, <tt><a href="#ref_while" title="while">while</a></tt>-<tt><a href="#ref_wend" title="wend">wend</a></tt> or <tt><a href="#ref_do" title="do">do</a></tt>-<tt><a href="#ref_loop" title="loop">loop</a></tt>; you may leave any of these loops with the <tt><a href="#ref_break" title="break">break</a></tt>-statement or start the next iteration immediately with <tt><a href="#ref_continue" title="continue">continue</a></tt>.</p><p>Decisions can be made with the <tt><a href="#ref_if" title="if">if</a></tt>-statement, which comes either in a <span class="emphasis"><i>short</i></span> and a <span class="emphasis"><i>long</i></span> form. The short form has no <tt><a href="#ref_then" title="then">then</a></tt>-keyword and extends up to the end of the line. The long form extends up to the final <tt><a href="#ref_endif" title="endif">endif</a></tt> and may use some of the keywords <tt><a href="#ref_then" title="then">then</a></tt> (which introduces the long form), <tt><a href="#ref_else" title="else">else</a></tt> or <tt><a href="#ref_elsif" title="elsif">elsif</a></tt>.</p><p>If you want to test the result of an expression against many different values, you should probably use the <tt><a href="#ref_switch" title="switch">switch</a></tt>-statement.</p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2787458"></a>Drawing and painting</h2></div></div><p>You need to call <tt><a href="#ref_open_window" title="open window">open window</a></tt> before you may draw anything with either <tt><a href="#ref_line" title="line">line</a></tt>, <tt><a href="#ref_circle" title="circle">circle</a></tt> or <tt><a href="#ref_rectangle" title="rectangle">rectangle</a></tt>; all of these statements may be decorated with <tt><a href="#ref_clear" title="clear">clear</a></tt> or <tt><a href="#ref_fill" title="fill">fill</a></tt>. Note however, that all graphics in yabasic is <span class="emphasis"><i>monochrome</i></span> (&quot;black on white&quot;). Moreover, there can only be a single window open at any given moment in time.</p><p>Evyerything you have drawn can be send to your printer too, if you use the <tt><a href="#ref_open_printer" title="open printer">open printer</a></tt> command.</p><p>To allow for some (very) limited version of animated graphics, yabasic offers the commands <tt><a href="#ref_getbit" title="getbit$()">getbit$</a></tt> and <tt><a href="#ref_putbit" title="putbit">putbit</a></tt>, which retrieve rectangular regions from the graphics-window into a string or vice versa.</p><p>If you want to sense mouse-clicks, you may use the <tt><a href="#ref_inkey" title="inkey$">inkey$</a></tt>-function.</p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2787636"></a>Reading from and writing to files</h2></div></div><p>Before you may read or write a file, you need to <tt><a href="#ref_open" title="open">open</a></tt> it; once you are done, you should <tt><a href="#ref_close" title="close">close</a></tt> it. Each open file is designated by a simple number, which might be stored within a variable and must be supplied if you want to access the file. This is simply done by putting a hash ('<tt>#</tt>') followd by the number of the file after the keyword <tt><a href="#ref_input" title="input">input</a></tt> (for reading from) or <tt><a href="#ref_print" title="print">print</a></tt> (for writing to a file) respectively.</p><p>If you need more control, you may consider reading and writing one byte at a time, using the multi-purpose commands <tt><a href="#ref_peek" title="peek">peek</a></tt> and <tt><a href="#ref_poke" title="poke">poke</a></tt>.</p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2787742"></a>Subroutines and Libraries</h2></div></div><p>The best way to break any yabasic-program into smaller, more manageable chunks are <span class="emphasis"><i>subroutines</i></span> and <span class="emphasis"><i>libraries</i></span>. They are yabasic's most advanced means of structuring a program.</p><p>Subroutines are created with the command <tt><a href="#ref_sub" title="sub">sub</a></tt>. they accept parameters and may return a value. Subroutines can be called much like any builtin function of yabasic; therefore they allow to <span class="emphasis"><i>extend</i></span> the language itself.</p><p>Once you have created a set of related subroutines and you feel that they could be useful in other programs too, you may collect them into a <span class="emphasis"><i>library</i></span>. Such a library is contained within a separate file and may be included in any of your programs, using the keyword <tt><a href="#ref_import" title="import">import</a></tt>.</p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2787834"></a>String processing</h2></div></div><p>yabasic has the usual functions to extract parts from a string: <tt><a href="#ref_left" title="left$()">left$</a></tt>, <tt><a href="#ref_mid" title="mid$()">mid$</a></tt> and <tt><a href="#ref_right" title="right$()">right$</a></tt>. Note, that all of them can be assigned to, i.e. they may <span class="emphasis"><i>change</i></span> part of a string.</p><p>If you want to split a string into tokens you should use the functions <tt><a href="#ref_token" title="token()">token</a></tt> or <tt><a href="#ref_split" title="split()">split</a></tt>.</p><p>There is quite a bunch of other string-processing functions like <tt><a href="#ref_upper" title="upper$()">upper$</a></tt> (converting to upper case), <tt><a href="#ref_instr" title="instr()">instr</a></tt> (finding one string within the other), <tt><a href="#ref_chr" title="chr$()">chr$</a></tt> (converting an ascii-code into a character), <tt><a href="#ref_glob" title="glob()">glob</a></tt> (testing a string against a pattern) and more. Just follow the links.</p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2787987"></a>Arithmetic</h2></div></div><p>Yabasic handles numbers and arithmetic: You may calculate trigonometric functions like <tt><a href="#ref_sin" title="sin()">sin</a></tt> or <tt><a href="#ref_atan" title="atan()">atan</a></tt>, or logarithms (with <tt><a href="#ref_log" title="log()">log</a></tt>). Bitwise operations, like <tt><a href="#ref_arithmetic_and" title="and()">and</a></tt> or <tt><a href="#ref_arithmetic_or" title="or()">or</a></tt> are available as well <tt><a href="#ref_min" title="min()">min</a></tt> or <tt><a href="#ref_max" title="max()">max</a></tt> (calculate the minimum or maximum of its argument) or <tt><a href="#ref_mod" title="mod()">mod</a></tt> or <tt><a href="#ref_int" title="int()">int</a></tt> (reminder of a division or integer part or a number).</p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2788126"></a>Data and such</h2></div></div><p>You may store data within your program within <tt><a href="#ref_data" title="data">data</a></tt>-statements; during execution you will probably want to <tt><a href="#ref_read" title="read">read</a></tt> it into <span class="emphasis"><i>arrays</i></span>, which must have been <tt><a href="#ref_dim" title="dim">dim</a></tt>ed before.</p></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2788182"></a>Other interesting commands.</h2></div></div><div class="itemizedlist"><ul><li><p>Yabasic programs may start other programs with the commands <tt><a href="#ref_system" title="system$()">system</a></tt> and <tt><a href="#ref_system2" title="system()">system$</a></tt>.</p></li><li><p><tt><a href="#ref_peek" title="peek">peek</a></tt> and <tt><a href="#ref_poke" title="poke">poke</a></tt> allow to get and set internal information; either for the operating system (i.e. Unix or Windows) or yabasic itself.</p></li><li><p>The current time or date can be retrieved with (guess what !) <tt><a href="#ref_time" title="time$">time$</a></tt> and <tt><a href="#ref_date" title="date$">date$</a></tt>.</p></li></ul></div></div></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="chapter_topics_list"></a>Chapter 5. All commands and functions of yabasic listed by topic</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#top_numbers">Number processing and conversion</a></dt><dt><a href="#top_conditions">Conditions and control structures</a></dt><dt><a href="#top_data">Data keeping and processing</a></dt><dt><a href="#top_strings">String processing</a></dt><dt><a href="#top_io">File operations and printing</a></dt><dt><a href="#top_sub">Subroutines and libraries</a></dt><dt><a href="#top_other">Other commands</a></dt><dt><a href="#top_graphics">Graphics and printing</a></dt></dl></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="top_numbers"></a>Number processing and conversion</h2></div></div><div class="variablelist"><dl><dt><span class="term"><a href="#ref_abs" title="abs()">abs()</a></span></dt><dd>
31
-	    returns the absolute value of its numeric argument
32
-	  </dd><dt><span class="term"><a href="#ref_acos" title="acos()">acos()</a></span></dt><dd>
33
-	    returns the arcus cosine of its numeric argument
34
-	  </dd><dt><span class="term"><a href="#ref_arithmetic_and" title="and()">and()</a></span></dt><dd>
35
-	    the bitwise arithmetic <tt>and</tt></dd><dt><span class="term"><a href="#ref_asin" title="asin()">asin()</a></span></dt><dd>
36
-	    returns the arcus sine of its numeric argument
37
-	  </dd><dt><span class="term"><a href="#ref_atan" title="atan()">atan()</a></span></dt><dd>
38
-	    returns the arcus tangens of its numeric argument
39
-	  </dd><dt><span class="term"><a href="#ref_bin" title="bin$()">bin$()</a></span></dt><dd>
40
-	    converts a number into a sequence of binary digits
41
-	  </dd><dt><span class="term"><a href="#ref_cos" title="cos()">cos()</a></span></dt><dd>
42
-	    return the cosine of its single argument
43
-	  </dd><dt><span class="term"><a href="#ref_dec" title="dec()">dec()</a></span></dt><dd>
44
-	    convert a base 2 or base 16 number into decimal form
45
-	  </dd><dt><span class="term"><a href="#ref_eor" title="eor()">eor()</a></span></dt><dd>
46
-	    compute the bitwise <span class="emphasis"><i>exclusive or</i></span> of its two arguments
47
-	  </dd><dt><span class="term"><a href="#ref_euler" title="euler">euler</a></span></dt><dd>
48
-	    another name for the constant <tt>2.71828182864</tt></dd><dt><span class="term"><a href="#ref_exp" title="exp()">exp()</a></span></dt><dd>
49
-	    compute the exponential function of its single argument
50
-	  </dd><dt><span class="term"><a href="#ref_frac" title="frac()">frac()</a></span></dt><dd>
51
-	    return the fractional part of its numeric argument
52
-	  </dd><dt><span class="term"><a href="#ref_int" title="int()">int()</a></span></dt><dd>
53
-	    return the integer part of its single numeric argument
54
-	  </dd><dt><span class="term"><a href="#ref_log" title="log()">log()</a></span></dt><dd>
55
-	    compute the natural logarithm
56
-	  </dd><dt><span class="term"><a href="#ref_max" title="max()">max()</a></span></dt><dd>
57
-	    return the larger of its two arguments
58
-	  </dd><dt><span class="term"><a href="#ref_min" title="min()">min()</a></span></dt><dd>
59
-	    return the smaller of its two arguments
60
-	  </dd><dt><span class="term"><a href="#ref_mod" title="mod()">mod()</a></span></dt><dd>
61
-	    compute the remainder of a division
62
-	  </dd><dt><span class="term"><a href="#ref_arithmetic_or" title="or()">or()</a></span></dt><dd>
63
-	    arithmetic or, used for bit-operations
64
-	  </dd><dt><span class="term"><a href="#ref_pi" title="pi">pi</a></span></dt><dd>
65
-	    a constant with the value <tt>3.14159</tt></dd><dt><span class="term"><a href="#ref_ran" title="ran()">ran()</a></span></dt><dd>
66
-	    return a random number
67
-	  </dd><dt><span class="term"><a href="#ref_sig" title="sig()">sig()</a></span></dt><dd>
68
-	    return the sign of its argument
69
-	  </dd><dt><span class="term"><a href="#ref_sin" title="sin()">sin()</a></span></dt><dd>
70
-	    return the sine of its single argument
71
-	  </dd><dt><span class="term"><a href="#ref_sqr" title="sqr()">sqr()</a></span></dt><dd>
72
-	    compute the square of its argument
73
-	  </dd><dt><span class="term"><a href="#ref_sqrt" title="sqrt()">sqrt()</a></span></dt><dd>
74
-	    compute the square root of its argument
75
-	  </dd><dt><span class="term"><a href="#ref_tan" title="tan()">tan()</a></span></dt><dd>
76
-	    return the tangens of its argument
77
-	  </dd><dt><span class="term"><a href="#ref_xor" title="xor()">xor()</a></span></dt><dd>
78
-	    compute the exclusive or
79
-	  </dd><dt><span class="term"><a href="#ref_pow" title="** or ^">** or ^</a></span></dt><dd>
80
-	    raise its first argument to the power of its second
81
-	  </dd></dl></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="top_conditions"></a>Conditions and control structures</h2></div></div><div class="variablelist"><dl><dt><span class="term"><a href="#ref_logical_and" title="and">and</a></span></dt><dd>
82
-	    logical and, used in conditions
83
-	  </dd><dt><span class="term"><a href="#ref_break" title="break">break</a></span></dt><dd>
84
-	    breaks out of a switch statement or a loop
85
-	  </dd><dt><span class="term"><a href="#ref_case" title="case">case</a></span></dt><dd>
86
-	    mark the different cases within a <tt><a href="#ref_switch" title="switch">switch</a></tt>-statement
87
-	  </dd><dt><span class="term"><a href="#ref_continue" title="continue">continue</a></span></dt><dd>
88
-	    start the next iteration of a <tt>for</tt>-, <tt>do</tt>-, <tt>repeat</tt>- or <tt>while</tt>-loop
89
-	  </dd><dt><span class="term"><a href="#ref_default" title="default">default</a></span></dt><dd>
90
-	    mark the <span class="emphasis"><i>default</i></span>-branch within a <tt><a href="#ref_switch" title="switch">switch</a></tt>-statement
91
-	  </dd><dt><span class="term"><a href="#ref_do" title="do">do</a></span></dt><dd>
92
-	    start a (conditionless) <tt>do-loop</tt></dd><dt><span class="term"><a href="#ref_else" title="else">else</a></span></dt><dd>
93
-	    mark an alternative within an <tt>if</tt>-statement
94
-	  </dd><dt><span class="term"><a href="#ref_elsif" title="elsif">elsif</a></span></dt><dd>
95
-	    starts an alternate condition within an <tt>if</tt>-statement
96
-	  </dd><dt><span class="term"><a href="#ref_end" title="end">end</a></span></dt><dd>
97
-	    terminate your program
98
-	  </dd><dt><span class="term"><a href="#ref_endif" title="endif">endif</a></span></dt><dd>
99
-	    ends an <tt>if</tt>-statement
100
-	  </dd><dt><span class="term"><a href="#ref_false" title="false">false</a></span></dt><dd>
101
-	    a constant with the value of 0
102
-	  </dd><dt><span class="term"><a href="#ref_fi" title="fi">fi</a></span></dt><dd>
103
-	    another name for <tt><a href="#ref_endif" title="endif">endif</a></tt></dd><dt><span class="term"><a href="#ref_for" title="for">for</a></span></dt><dd>
104
-	    starts a <tt>for</tt>-loop
105
-	  </dd><dt><span class="term"><a href="#ref_gosub" title="gosub">gosub</a></span></dt><dd>
106
-	    continue execution at another point within your program (and return later)
107
-	  </dd><dt><span class="term"><a href="#ref_goto" title="goto">goto</a></span></dt><dd>
108
-	    continue execution at another point within your program (and never come back)
109
-	  </dd><dt><span class="term"><a href="#ref_if" title="if">if</a></span></dt><dd>
110
-	    evaluate a condition and execute statements or not, depending on the result
111
-	  </dd><dt><span class="term"><a href="#ref_label" title="label">label</a></span></dt><dd>
112
-	    mark a specific location within your program for <tt>goto</tt>, <tt>gosub</tt> or <tt>restore</tt></dd><dt><span class="term"><a href="#ref_loop" title="loop">loop</a></span></dt><dd>
113
-	    marks the end of an infinite loop
114
-	  </dd><dt><span class="term"><a href="#ref_next" title="next">next</a></span></dt><dd>
115
-	    mark the end of a for loop
116
-	  </dd><dt><span class="term"><a href="#ref_not" title="not">not</a></span></dt><dd>
117
-	    negate an expression; can be written as <tt>!</tt></dd><dt><span class="term"><a href="#ref_on_gosub" title="on gosub">on gosub</a></span></dt><dd>
118
-	    jump to one of multiple <tt>gosub</tt>-targets
119
-	  </dd><dt><span class="term"><a href="#ref_on_goto" title="on goto">on goto</a></span></dt><dd>
120
-	    jump to one of many <tt>goto</tt>-targets
121
-	  </dd><dt><span class="term"><a href="#ref_on_interrupt" title="on interrupt">on interrupt</a></span></dt><dd>
122
-	    change reaction on keyboard interrupts
123
-	  </dd><dt><span class="term"><a href="#ref_logical_or" title="logical or">logical or</a></span></dt><dd>
124
-	    logical or, used in conditions
125
-	  </dd><dt><span class="term"><a href="#ref_pause" title="pause">pause</a></span></dt><dd>
126
-	    pause, sleep, wait for the specified number of seconds
127
-	  </dd><dt><span class="term"><a href="#ref_repeat" title="repeat">repeat</a></span></dt><dd>
128
-	    start a <tt>repeat</tt>-loop
129
-	  </dd><dt><span class="term"><a href="#ref_return" title="return">return</a></span></dt><dd>
130
-	    return from a subroutine or a gosub
131
-	  </dd><dt><span class="term"><a href="#ref_sleep" title="sleep">sleep</a></span></dt><dd>
132
-	    pause, sleep, wait for the specified number of seconds
133
-	  </dd><dt><span class="term"><a href="#ref_switch" title="switch">switch</a></span></dt><dd>
134
-	    select one of many alternatives depending on a value
135
-	  </dd><dt><span class="term"><a href="#ref_then" title="then">then</a></span></dt><dd>
136
-	    tell the long from the short form of the <tt>if</tt>-statement
137
-	  </dd><dt><span class="term"><a href="#ref_true" title="true">true</a></span></dt><dd>
138
-	    a constant with the value of 1
139
-	  </dd><dt><span class="term"><a href="#ref_until" title="until">until</a></span></dt><dd>
140
-	    end a <tt>repeat</tt>-loop
141
-	  </dd><dt><span class="term"><a href="#ref_wait" title="wait">wait</a></span></dt><dd>
142
-	    pause, sleep, wait for the specified number of seconds
143
-	  </dd><dt><span class="term"><a href="#ref_wend" title="wend">wend</a></span></dt><dd>
144
-	    end a <tt><a href="#ref_while" title="while">while</a></tt>-loop
145
-	  </dd><dt><span class="term"><a href="#ref_while" title="while">while</a></span></dt><dd>
146
-	    start a <tt>while</tt>-loop
147
-	  </dd><dt><span class="term"><a href="#ref_colon" title=":">:</a></span></dt><dd>
148
-	    separate commands from each other
149
-	  </dd></dl></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="top_data"></a>Data keeping and processing</h2></div></div><div class="variablelist"><dl><dt><span class="term"><a href="#ref_arraydim" title="arraydim()">arraydim()</a></span></dt><dd>
150
-	    returns the dimension of the array, which is passed as an <a href="#ref_array_references" title="References on arrays">array reference</a></dd><dt><span class="term"><a href="#ref_arraysize" title="arraysize()">arraysize()</a></span></dt><dd>
151
-	    returns the size of a dimension of an array
152
-	  </dd><dt><span class="term"><a href="#ref_data" title="data">data</a></span></dt><dd>
153
-	    introduces a list of data-items
154
-	  </dd><dt><span class="term"><a href="#ref_dim" title="dim">dim</a></span></dt><dd>
155
-	    create an array prior to its first use
156
-	  </dd><dt><span class="term"><a href="#ref_read" title="read">read</a></span></dt><dd>
157
-	    read data from <tt>data</tt>-statements
158
-	  </dd><dt><span class="term"><a href="#ref_redim" title="redim">redim</a></span></dt><dd>
159
-	    create an array prior to its first use. A synonym for <tt>dim</tt></dd><dt><span class="term"><a href="#ref_restore" title="restore">restore</a></span></dt><dd>
160
-	    reposition the <tt>data</tt>-pointer
161
-	  </dd></dl></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="top_strings"></a>String processing</h2></div></div><div class="variablelist"><dl><dt><span class="term"><a href="#ref_asc" title="asc()">asc()</a></span></dt><dd>
162
-	    accepts a string and returns the position of its first character within the ascii charset
163
-	  </dd><dt><span class="term"><a href="#ref_chr" title="chr$()">chr$()</a></span></dt><dd>
164
-	    accepts a number and returns the character at this position within the ascii charset
165
-	  </dd><dt><span class="term"><a href="#ref_glob" title="glob()">glob()</a></span></dt><dd>
166
-	    check if a string matches a simple pattern
167
-	  </dd><dt><span class="term"><a href="#ref_hex" title="hex$()">hex$()</a></span></dt><dd>
168
-	    convert a number into hexadecimal
169
-	  </dd><dt><span class="term"><a href="#ref_instr" title="instr()">instr()</a></span></dt><dd>
170
-	    searches its second argument within the first; returns its position if found
171
-	  </dd><dt><span class="term"><a href="#ref_left" title="left$()">left$()</a></span></dt><dd>
172
-	    return (<span class="emphasis"><i>or change</i></span>) left end of a string
173
-	  </dd><dt><span class="term"><a href="#ref_len" title="len()">len()</a></span></dt><dd>
174
-	    return the length of a string
175
-	  </dd><dt><span class="term"><a href="#ref_lower" title="lower$()">lower$()</a></span></dt><dd>
176
-	    convert a string to lower case
177
-	  </dd><dt><span class="term"><a href="#ref_ltrim" title="ltrim$()">ltrim$()</a></span></dt><dd>
178
-	    trim spaces at the left end of a string
179
-	  </dd><dt><span class="term"><a href="#ref_mid" title="mid$()">mid$()</a></span></dt><dd>
180
-	    return (<span class="emphasis"><i>or change</i></span>) characters from within a string
181
-	  </dd><dt><span class="term"><a href="#ref_right" title="right$()">right$()</a></span></dt><dd>
182
-	    return (<span class="emphasis"><i>or change</i></span>) the right end of a string
183
-	  </dd><dt><span class="term"><a href="#ref_split" title="split()">split()</a></span></dt><dd>
184
-	    split a string into many strings
185
-	  </dd><dt><span class="term"><a href="#ref_str" title="str$()">str$()</a></span></dt><dd>
186
-	    convert a number into a string
187
-	  </dd><dt><span class="term"><a href="#ref_token" title="token()">token()</a></span></dt><dd>
188
-	    split a string into multiple strings
189
-	  </dd><dt><span class="term"><a href="#ref_trim" title="trim$()">trim$()</a></span></dt><dd>
190
-	    remove leading and trailing spaces from its argument
191
-	  </dd><dt><span class="term"><a href="#ref_upper" title="upper$()">upper$()</a></span></dt><dd>
192
-	    convert a string to upper case
193
-	  </dd><dt><span class="term"><a href="#ref_val" title="val()">val()</a></span></dt><dd>
194
-	    converts a string to a number
195
-	  </dd></dl></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="top_io"></a>File operations and printing</h2></div></div><div class="variablelist"><dl><dt><span class="term"><a href="#ref_at" title="at()">at()</a></span></dt><dd>
196
-	    can be used in the <tt>print</tt>-command to place the output at a specified position
197
-	  </dd><dt><span class="term"><a href="#ref_beep" title="beep">beep</a></span></dt><dd>
198
-	    ring the bell within your computer; a synonym for <tt>bell</tt></dd><dt><span class="term"><a href="#ref_bell" title="bell">bell</a></span></dt><dd>
199
-	    ring the bell within your computer (just as <tt>beep</tt>)
200
-	  </dd><dt><span class="term"><a href="#ref_clear" title="clear">clear screen</a></span></dt><dd>
201
-	    erases the text window
202
-	  </dd><dt><span class="term"><a href="#ref_close" title="close">close</a></span></dt><dd>
203
-	    close a file, which has been opened before
204
-	  </dd><dt><span class="term"><a href="#ref_close" title="close">close printer</a></span></dt><dd>
205
-	    stops printing of graphics
206
-	  </dd><dt><span class="term"><a href="#ref_color" title="color">color</a></span></dt><dd>
207
-	    print with color
208
-	  </dd><dt><span class="term"><a href="#ref_colour" title="colour">colour</a></span></dt><dd>
209
-	    see <tt><a href="#ref_color" title="color">color</a></tt></dd><dt><span class="term"><a href="#ref_eof" title="eof">eof</a></span></dt><dd>
210
-	    check, if an open file contains data
211
-	  </dd><dt><span class="term"><a href="#ref_getscreen" title="getscreen$()">getscreen$()</a></span></dt><dd>
212
-	    returns a string representing a rectangular section of the text terminal
213
-	  </dd><dt><span class="term"><a href="#ref_inkey" title="inkey$">inkey$</a></span></dt><dd>
214
-	    wait, until a key is pressed
215
-	  </dd><dt><span class="term"><a href="#ref_input" title="input">input</a></span></dt><dd>
216
-	    read input from the user (or from a file) and assign it to a variable
217
-	  </dd><dt><span class="term"><a href="#ref_line" title="line">line input</a></span></dt><dd>
218
-	    read in a whole line of text and assign it to a variable
219
-	  </dd><dt><span class="term"><a href="#ref_open" title="open">open</a></span></dt><dd>
220
-	    open a file
221
-	  </dd><dt><span class="term"><a href="#ref_open_printer" title="open printer">open printer</a></span></dt><dd>
222
-	    open printer for printing graphics
223
-	  </dd><dt><span class="term"><a href="#ref_print" title="print">print</a></span></dt><dd>
224
-	    Write to terminal or file
225
-	  </dd><dt><span class="term"><a href="#ref_putscreen" title="putscreen">putscreen</a></span></dt><dd>
226
-	    draw a rectangle of characters into the text terminal
227
-	  </dd><dt><span class="term"><a href="#ref_reverse" title="reverse">reverse</a></span></dt><dd>
228
-	    print reverse (background and foreground colors exchanged)
229
-	  </dd><dt><span class="term"><a href="#ref_screen" title="screen">screen</a></span></dt><dd>
230
-	    as <tt>clear screen</tt> clears the text window
231
-	  </dd><dt><span class="term"><a href="#ref_seek" title="seek()">seek()</a></span></dt><dd>
232
-	    change the position within an open file
233
-	  </dd><dt><span class="term"><a href="#ref_tell" title="tell">tell</a></span></dt><dd>
234
-	    get the current position within an open file
235
-	  </dd><dt><span class="term"><a href="#ref_using" title="using">using</a></span></dt><dd>
236
-	    Specify the format for printing a number
237
-	  </dd><dt><span class="term"><a href="#ref_hash" title="#">#</a></span></dt><dd>
238
-	    either a comment or a marker for a file-number
239
-	  </dd><dt><span class="term"><a href="#ref_at" title="at()">@</a></span></dt><dd>
240
-	    synonymous to <tt><a href="#ref_at" title="at()">at</a></tt></dd><dt><span class="term"><a href="#ref_semicolon" title=";">;</a></span></dt><dd>
241
-	    suppress the implicit newline after a <tt><a href="#ref_print" title="print">print</a></tt>-statement
242
-	  </dd></dl></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="top_sub"></a>Subroutines and libraries</h2></div></div><div class="variablelist"><dl><dt><span class="term"><a href="#ref_end_sub" title="end sub">end sub</a></span></dt><dd>
243
-	    ends a subroutine definition
244
-	  </dd><dt><span class="term"><a href="#ref_export" title="export">export</a></span></dt><dd>
245
-	    mark a function as globally visible
246
-	  </dd><dt><span class="term"><a href="#ref_import" title="import">import</a></span></dt><dd>
247
-	    import a library
248
-	  </dd><dt><span class="term"><a href="#ref_local" title="local">local</a></span></dt><dd>
249
-	    mark a variable as local to a subroutine
250
-	  </dd><dt><span class="term"><a href="#ref_numparams" title="numparams">numparams</a></span></dt><dd>
251
-	    return the number of parameters, that have been passed to a subroutine
252
-	  </dd><dt><span class="term"><a href="#ref_return" title="return">return</a></span></dt><dd>
253
-	    return from a subroutine or a gosub
254
-	  </dd><dt><span class="term"><a href="#ref_static" title="static">static</a></span></dt><dd>
255
-	    preserves the value of a variable between calls to a subroutine
256
-	  </dd><dt><span class="term"><a href="#ref_step" title="step">step</a></span></dt><dd>
257
-	    specifies the increment step in a for-loop
258
-	  </dd><dt><span class="term"><a href="#ref_sub" title="sub">sub</a></span></dt><dd>
259
-	    declare a user defined subroutine
260
-	  </dd></dl></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="top_other"></a>Other commands</h2></div></div><div class="variablelist"><dl><dt><span class="term"><a href="#ref_bind" title="bind()">bind()</a></span></dt><dd>
261
-	    Binds a yabasic-program and the yabasic-interpreter together into a <span class="emphasis"><i>standalone</i></span> program.
262
-	  </dd><dt><span class="term"><a href="#ref_compile" title="compile">compile</a></span></dt><dd>
263
-	    compile a string with yabasic-code <span class="emphasis"><i>on the fly</i></span></dd><dt><span class="term"><a href="#ref_date" title="date$">date$</a></span></dt><dd>
264
-	    returns a string with various components of the current date
265
-	  </dd><dt><span class="term"><a href="#ref_doc" title="doc">doc</a></span></dt><dd>
266
-	    special comment, which might be retrieved by the program itself
267
-	  </dd><dt><span class="term"><a href="#ref_docu" title="docu$">docu$</a></span></dt><dd>
268
-	    special array, containing the contents of all docu-statement within the program
269
-	  </dd><dt><span class="term"><a href="#ref_error" title="error">error</a></span></dt><dd>
270
-	    raise an error and terminate your program
271
-	  </dd><dt><span class="term"><a href="#ref_execute" title="execute()">execute$()</a></span></dt><dd>
272
-	    execute a user defined subroutine, which must return a string
273
-	  </dd><dt><span class="term"><a href="#ref_execute" title="execute()">execute()</a></span></dt><dd>
274
-	    execute a user defined subroutine, which must return a number
275
-	  </dd><dt><span class="term"><a href="#ref_exit" title="exit">exit</a></span></dt><dd>
276
-	    terminate your program
277
-	  </dd><dt><span class="term"><a href="#ref_pause" title="pause">pause</a></span></dt><dd>
278
-	    pause, sleep, wait for the specified number of seconds
279
-	  </dd><dt><span class="term"><a href="#ref_peek" title="peek">peek</a></span></dt><dd>
280
-	    retrieve various internal informations
281
-	  </dd><dt><span class="term"><a href="#ref_peek2" title="peek$">peek$</a></span></dt><dd>
282
-	    retrieve various internal string-informations
283
-	  </dd><dt><span class="term"><a href="#ref_poke" title="poke">poke</a></span></dt><dd>
284
-	    change selected internals of yabasic</dd><dt><span class="term"><a href="#ref_rem" title="rem">rem</a></span></dt><dd>
285
-	    start a comment
286
-	  </dd><dt><span class="term"><a href="#ref_sleep" title="sleep">sleep</a></span></dt><dd>
287
-	    pause, sleep, wait for the specified number of seconds
288
-	  </dd><dt><span class="term"><a href="#ref_system" title="system$()">system$()</a></span></dt><dd>
289
-	    hand a statement over to your operating system and return its output
290
-	  </dd><dt><span class="term"><a href="#ref_system2" title="system()">system()</a></span></dt><dd>
291
-	    hand a statement over to your operating system and return its exitcode
292
-	  </dd><dt><span class="term"><a href="#ref_time" title="time$">time$</a></span></dt><dd>
293
-	    return a string containing the current time
294
-	  </dd><dt><span class="term"><a href="#ref_to" title="to">to</a></span></dt><dd>
295
-	    this keyword appears as part of other statements
296
-	  </dd><dt><span class="term"><a href="#ref_wait" title="wait">wait</a></span></dt><dd>
297
-	    pause, sleep, wait for the specified number of seconds
298
-	  </dd><dt><span class="term"><a href="#ref_double_slash" title="//">//</a></span></dt><dd>
299
-	    starts a comment
300
-	  </dd><dt><span class="term"><a href="#ref_colon" title=":">:</a></span></dt><dd>
301
-	    separate commands from each other
302
-	  </dd></dl></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="top_graphics"></a>Graphics and printing</h2></div></div><div class="variablelist"><dl><dt><span class="term"><a href="#ref_box" title="box">box</a></span></dt><dd>
303
-	    draw a rectancle. A synonym for <tt>rectangle</tt></dd><dt><span class="term"><a href="#ref_circle" title="circle">circle</a></span></dt><dd>
304
-	    draws a circle in the graphic-window
305
-	  </dd><dt><span class="term"><a href="#ref_clear" title="clear">clear</a></span></dt><dd>
306
-	    Erase <tt>circle</tt>s or <tt>rectangle</tt>s
307
-	  </dd><dt><span class="term"><a href="#ref_clear_window" title="clear window">clear window</a></span></dt><dd>
308
-	    clear the graphic window and begin a new page, if prining is under way
309
-	  </dd><dt><span class="term"><a href="#ref_close" title="close">close curve</a></span></dt><dd>
310
-	    close a curve, that has been drawn by the <tt>line</tt>-command
311
-	  </dd><dt><span class="term"><a href="#ref_close" title="close">close window</a></span></dt><dd>
312
-	    close the graphics-window
313
-	  </dd><dt><span class="term"><a href="#ref_dot" title="dot">dot</a></span></dt><dd>
314
-	    draw a dot in the graphic-window
315
-	  </dd><dt><span class="term"><a href="#ref_fill" title="fill">fill</a></span></dt><dd>
316
-	    draw a filled <tt>circle</tt>s or <tt>rectangle</tt>s
317
-	  </dd><dt><span class="term"><a href="#ref_getbit" title="getbit$()">getbit$()</a></span></dt><dd>
318
-	    return a string representing the bit pattern of a rectangle within the graphic window
319
-	  </dd><dt><span class="term"><a href="#ref_line" title="line">line</a></span></dt><dd>
320
-	    draw a line
321
-	  </dd><dt><span class="term"><a href="#ref_mouseb" title="mouseb">mouseb</a></span></dt><dd>
322
-	    extract the state of the mousebuttons from a string returned by <tt>inkey$</tt></dd><dt><span class="term"><a href="#ref_mousemod" title="mousemod">mousemod</a></span></dt><dd>
323
-	    return the state of the modifier keys during a mouseclick
324
-	  </dd><dt><span class="term"><a href="#ref_mousex" title="mousex">mousex</a></span></dt><dd>
325
-	    return the x-position of a mouseclick
326
-	  </dd><dt><span class="term"><a href="#ref_mousey" title="mousey">mousey</a></span></dt><dd>
327
-	    return the y-position of a mouseclick
328
-	  </dd><dt><span class="term"><a href="#ref_new_curve" title="new curve">new curve</a></span></dt><dd>
329
-	    start a new curve, that will be drawn with the <tt>line</tt>-command
330
-	  </dd><dt><span class="term"><a href="#ref_open_window" title="open window">open window</a></span></dt><dd>
331
-	    open a graphic window
332
-	  </dd><dt><span class="term"><a href="#ref_putbit" title="putbit">putbit</a></span></dt><dd>
333
-	    draw a rectangle of pixels into the graphic window
334
-	  </dd><dt><span class="term"><a href="#ref_rectangle" title="rectangle">rectangle</a></span></dt><dd>
335
-	    draw a rectangle
336
-	  </dd><dt><span class="term"><a href="#ref_text" title="text">text</a></span></dt><dd>
337
-	    write text into your graphic-window
338
-	  </dd><dt><span class="term"><a href="#ref_origin" title="window origin">window origin</a></span></dt><dd>
339
-	    move the origin of a window
340
-	  </dd></dl></div></div></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="chapter_ref_words"></a>Chapter 6. All commands and functions of yabasic grouped alphabetically</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#ref_a">A</a></dt><dt><a href="#ref_b">B</a></dt><dt><a href="#ref_c">C</a></dt><dt><a href="#ref_d">D</a></dt><dt><a href="#ref_e">E</a></dt><dt><a href="#ref_f">F</a></dt><dt><a href="#ref_g">G</a></dt><dt><a href="#ref_h">H</a></dt><dt><a href="#ref_i">I</a></dt><dt><a href="#ref_l">L</a></dt><dt><a href="#ref_m">M</a></dt><dt><a href="#ref_n">N</a></dt><dt><a href="#ref_o">O</a></dt><dt><a href="#ref_p">P</a></dt><dt><a href="#ref_r">R</a></dt><dt><a href="#ref_s">S</a></dt><dt><a href="#ref_t">T</a></dt><dt><a href="#ref_u">U</a></dt><dt><a href="#ref_v">V</a></dt><dt><a href="#ref_w">W</a></dt><dt><a href="#ref_x">X</a></dt><dt><a href="#ref_special_characters">Special characters</a></dt></dl></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="ref_a"></a>A</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#ref_abs">abs()</a> - returns the absolute value of its numeric argument</dt><dt><a href="#ref_acos">acos()</a> - returns the arcus cosine of its numeric argument</dt><dt><a href="#ref_logical_and">and</a> - logical and, used in conditions</dt><dt><a href="#ref_arithmetic_and">and()</a> - the bitwise arithmetic and</dt><dt><a href="#ref_arraydim">arraydim()</a> - returns the dimension of the array, which is passed as an array reference</dt><dt><a href="#ref_arraysize">arraysize()</a> - returns the size of a dimension of an array</dt><dt><a href="#ref_asc">asc()</a> - accepts a string and returns the position of its first character within the ascii charset</dt><dt><a href="#ref_asin">asin()</a> - returns the arcus sine of its numeric argument</dt><dt><a href="#ref_at">at()</a> - can be used in the print-command to place the output at a specified position</dt><dt><a href="#ref_atan">atan()</a> - returns the arcus tangens of its numeric argument</dt></dl></div><div class="refentry"><h1 class="title"><a name="ref_abs"></a>abs()</h1><div class="refnamediv"><h2>Name</h2><p>abs() &#8212; returns the absolute value of its numeric argument</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">y=abs(x)</pre></div><div class="refsect1"><h2>Description</h2><p>If the argument of the <tt>abs</tt>-function is positive (e.g. 2) it is returned unchanged, if the argument is negative (e.g. -1) it is returned as a positive value (e.g. 1).</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
341
-print abs(-2),abs(2)
342
-          </pre><p>This example will print <tt>2 2</tt></p></div></div><div class="refsect1"><h2>See also</h2><p><a href="#ref_sig" title="sig()"><tt>sig</tt></a></p></div></div><div class="refentry"><h1 class="title"><a name="ref_acos"></a>acos()</h1><div class="refnamediv"><h2>Name</h2><p>acos() &#8212; returns the arcus cosine of its numeric argument</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">x=acos(angle)</pre></div><div class="refsect1"><h2>Description</h2><p>The <tt>acos</tt> is the arcus cosine-function, i.e. the inverse of the <a href="#ref_cos" title="cos()"><tt>cos</tt></a>-function. Or, more elaborate: It Returns the angle (in radian, not degree !), which, fed to the cosine-function will produce the argument passed to the <tt>acos</tt>-function.</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
343
-print acos(0.5),acos(cos(pi))
344
-          </pre><p>This example will print <tt>1.0472 3.14159</tt> which are &#960;/3 and &#960; respectively.</p></div></div><div class="refsect1"><h2>See also</h2><p><a href="#ref_cos" title="cos()"><tt>cos</tt></a>, <a href="#ref_asin" title="asin()"><tt>asin</tt></a></p></div></div><div class="refentry"><h1 class="title"><a name="ref_logical_and"></a>and</h1><div class="refnamediv"><h2>Name</h2><p>and &#8212; logical and, used in conditions</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
345
-if (a and b) &#8230;
346
-while (a and b) &#8230;
347
-</pre></div><div class="refsect1"><h2>Description</h2><p>Used in conditions (e.g within <tt><a href="#ref_if" title="if">if</a></tt>, <tt><a href="#ref_while" title="while">while</a></tt> or <tt><a href="#ref_until" title="until">until</a></tt>) to join two expressions. Returns <tt>true</tt>, if and only if its left and right argument are both <tt>true</tt> and <tt>false</tt> otherwise.</p><p>Note, that <a href="#ref_logical_shortcuts" title="Logical shortcuts"><span class="emphasis"><i>logical shortcuts</i></span></a>may take place.</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
348
-input &quot;Please enter a number&quot; a
349
-if (a&gt;=1 and a&lt;=9) print &quot;your input is between 1 and 9&quot;
350
-          </pre></div></div><div class="refsect1"><h2>See also</h2><p><a href="#ref_logical_or" title="logical or"><tt>or</tt></a>,<a href="#ref_not" title="not"><tt>not</tt></a></p></div></div><div class="refentry"><h1 class="title"><a name="ref_arithmetic_and"></a>and()</h1><div class="refnamediv"><h2>Name</h2><p>and() &#8212; the bitwise arithmetic <tt>and</tt></p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
351
-x=and(a,b)
352
-</pre></div><div class="refsect1"><h2>Description</h2><p>Used to compute the bitwise <tt>and</tt> of both its argument. Both arguments are treated as binary numbers (i.e. a series of 0 and 1); a bit of the resulting value will then be 1, if both arguments have a 1 at this position in their binary representation.</p><p>Note, that both arguments are silently converted to integer values and that negative numbers have their own binary representation and may lead to unexpected results when passed to <tt>and</tt>.</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
353
-print and(6,3)
354
-          </pre><p>This will print <tt>2</tt>. This result is clear, if you note, that the binary representation of 6 and 3 are 110 and 011 respectively; this will yield 010 in binary representaion or 2 as decimal.</p></div></div><div class="refsect1"><h2>See also</h2><p><a href="#ref_arithmetic_or" title="or()"><tt>or</tt></a>, <a href="#ref_eor" title="eor()"><tt>eor</tt></a> and <a href="#ref_not" title="not"><tt>not</tt></a></p></div></div><div class="refentry"><h1 class="title"><a name="ref_arraydim"></a>arraydim()</h1><div class="refnamediv"><h2>Name</h2><p>arraydim() &#8212; returns the dimension of the array, which is passed as an <a href="#ref_array_references" title="References on arrays">array reference</a></p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">a=arraydim(b())</pre></div><div class="refsect1"><h2>Description</h2><p>If you apply the <tt>arraydim()</tt>-function on a one-dimensional array (i.e. a vector) it will return <tt>1</tt>, on a two-dimensional array (i.e. a matrix) it will return 2, and so on.</p><p>This is mostly used within subroutines, which expect an array among their parameters. Such subroutines tend to use the <tt>arraydim</tt>-funtion to check, if the array which has been passed, has the right dimension. E.g. a subroutine to multiply two matrices may want to check, if it really is invoked with two 2-dimensional arrays.</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
355
-dim a(10,10),b(10)
356
-print arraydim(a()),arraydim(b())
357
-          </pre><p>This will print <tt>2 1</tt>, which are the dimension of the arrays <tt>a()</tt> and <tt>b()</tt>. You may check out the function <a href="#ref_arraysize" title="arraysize()"><tt>arraysize</tt></a> for a full-fledged example.</p></div></div><div class="refsect1"><h2>See also</h2><p><a href="#ref_arraysize" title="arraysize()"><tt>arraysize</tt></a> and <a href="#ref_dim" title="dim"><tt>dim</tt></a>.</p></div></div><div class="refentry"><h1 class="title"><a name="ref_arraysize"></a>arraysize()</h1><div class="refnamediv"><h2>Name</h2><p>arraysize() &#8212; returns the size of a dimension of an array</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">x=arraysize(a(),b)</pre></div><div class="refsect1"><h2>Description</h2><p>The <tt>arraysize</tt>-function computes the size of a specified dimension of a specified array. Here, <span class="emphasis"><i>size</i></span> stands for the maximum number, that may be used as an index for this array. The first argument to this function must be an <a href="#ref_array_references" title="References on arrays">reference to an array</a>, the second one specifies, which of the multiple dimensions of the array should be taken to calculate the size.</p><p>An Example involving subroutines: Let's say, an array has been declared as <tt>dim a(10,20)</tt> (that is a two-dimensional array or a matrix). If this array is passed as an <a href="#ref_array_references" title="References on arrays">array reference</a> to a subroutine, this sub will not know, what sort of array has been passed. With the <tt>arraydim</tt>-function the sub will be able to find the dimension of the array, with the <tt>arraysize</tt>-function it will be able to find out the size of this array in its two dimensions, which will be 10 and 20 respectively.</p><p>Our sample array is two dimensional; if you envision it as a matrix this matrix has 10 lines and 20 columns (see the <tt>dim</tt>-statement above. To state it more formally: The first dimension (lines) has a size of 10, the second dimension (columns) has a size of 20; these mumbers are those returned by <tt>arraysize(a(),1)</tt> and <tt>arraysize(a(),2)</tt> respectively. Refer to the example below for a typical usage.</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
358
-
359
-rem
360
-rem  This program adds two matrices elementwise.
361
-rem
362
-
363
-dim a(10,20),b(10,20),c(10,20)
364
-
365
-rem  initialization of the arrays a() and b() 
366
-for y=1 to 10:for x=1 to 20
367
-   a(y,x)=int(ran(4)):b(y,x)=int(ran(4))
368
-next x:next y
369
-
370
-matadd(a(),b(),c())
371
-
372
-print &quot;Result:&quot;
373
-for x=1 to 20
374
-   for y=10 to 1 step -1
375
-      print c(y,x),&quot; &quot;;
376
-   next y
377
-   print
378
-next x
379
-
380
-sub matadd(m1(),m2(),r())
381
-
382
-   rem  This sub will add the matrices m1() and m2()
383
-   rem  elementwise and store the result within r()
384
-   rem  This is not very useful but easy to implement.
385
-   rem  However, this sub excels in checking its arguments
386
-   rem  with arraydim() and arraysize()
387
-
388
-   local x:local y
389
-   
390
-   if (arraydim(m1())&lt;&gt;2 or arraydim(m2())&lt;&gt;2 or arraydim(r())&lt;&gt;2) then
391
-      error &quot;Need two dimensional arrays as input&quot;
392
-   endif
393
-
394
-   y=arraysize(m1(),1):x=arraysize(m1(),2)
395
-   if (arraysize(m2(),1)&lt;&gt;y or arraysize(m2(),2)&lt;&gt;x) then
396
-      error &quot;The two matrices cannot be added elementwise&quot;
397
-   endif
398
-
399
-   if (arraysize(r(),1)&lt;&gt;y or arraysize(r(),2)&lt;&gt;x) then
400
-      error &quot;The result cannot be stored in the third argument&quot;
401
-   endif
402
-
403
-   local xx:local yy
404
-   for xx=1 to x
405
-      for yy=1 to y
406
-         r(yy,xx)=m1(yy,xx)+m2(yy,xx)
407
-      next yy
408
-   next xx
409
-
410
- end sub
411
-
412
-          </pre></div></div><div class="refsect1"><h2>See also</h2><p><a href="#ref_arraydim" title="arraydim()"><tt>arraydim</tt></a> and <a href="#ref_dim" title="dim"><tt>dim</tt></a>.</p></div></div><div class="refentry"><h1 class="title"><a name="ref_asc"></a>asc()</h1><div class="refnamediv"><h2>Name</h2><p>asc() &#8212; accepts a string and returns the position of its first character within the ascii charset</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">a=asc(char$)</pre></div><div class="refsect1"><h2>Description</h2><p>The <tt>asc</tt>-function accepts a string, takes its first character and looks it up within the ascii-charset; this position will be returned. The <tt>asc</tt>-function is the opposite of the <tt><a href="#ref_chr" title="chr$()">chr$</a></tt>-function. There are valid uses for <tt>asc</tt>, however, comparing strings (i.e. to bring them into alphabetical sequence) is <span class="emphasis"><i>not</i></span> among them; in such many cases you might consider to compare strings directly with <tt>&lt;</tt>, <tt>=</tt> and <tt>&gt;</tt> (rather than converting a string to a number and comparing this number).</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
413
-input &quot;Please enter a letter between 'a' and 'y': &quot; a$
414
-if (a$&lt;&quot;a&quot; or a$&gt;&quot;y&quot;) print a$,&quot; is not in the proper range&quot;:end
415
-print &quot;The letter after &quot;,a$,&quot; is &quot;,chr$(asc(a$)+1)
416
-          </pre></div></div><div class="refsect1"><h2>See also</h2><p><a href="#ref_chr" title="chr$()"><tt>chr$</tt></a></p></div></div><div class="refentry"><h1 class="title"><a name="ref_asin"></a>asin()</h1><div class="refnamediv"><h2>Name</h2><p>asin() &#8212; returns the arcus sine of its numeric argument</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">angle=asin(x)</pre></div><div class="refsect1"><h2>Description</h2><p>The <tt>acos</tt> is the arcus sine-function, i.e. the inverse of the <a href="#ref_sin" title="sin()"><tt>sin</tt></a>-function. Or, more elaborate: It Returns the angle (in radian, not degree !), which, fed to the sine-function will produce the argument passed to the <tt>asin</tt>-function.</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
417
-print asin(0.5),asin(sin(pi))
418
-          </pre><p>This will print <tt>0.523599 -2.06823e-13</tt> which is &#960; and almost 0 respectively.</p></div></div><div class="refsect1"><h2>See also</h2><p><a href="#ref_sin" title="sin()"><tt>sin</tt></a>, <a href="#ref_acos" title="acos()"><tt>acos</tt></a></p></div></div><div class="refentry"><h1 class="title"><a name="ref_at"></a>at()</h1><div class="refnamediv"><h2>Name</h2><p>at() &#8212; can be used in the <tt>print</tt>-command to place the output at a specified position</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
419
-clear screen
420
-&#8230;
421
-print at(a,b)
422
-print @(a,b)
423
-</pre></div><div class="refsect1"><h2>Description</h2><p>The <tt>at</tt>-clause takes two numeric arguments (e.g. <tt>at(2,3)</tt>) and can be inserted after the <tt>print</tt>-keyword. <tt>at()</tt> can be used only if <a href="#ref_clear_screen" title="clear screen"><tt>clear screen</tt></a> has been executed at least once within the program (otherwise you will get an error).</p><p>The two numeric arguments of the <tt>at</tt>-function may range from 0 to the width of your terminal minus 1, and from 0 to the height of your terminal minus 1; if any argument exceeds these values, it will be truncated accordingly. However, yabasic has no influence on the size of your terminal (80x25 is a common, but not mandatory), the size of your terminal and the maximum values acceptable within the <tt>at</tt>-clause may vary. To get the size of your terminal you may use the <a href="#ref_peek" title="peek"><tt>peek</tt></a>-function: <tt>peek(&quot;screenwidth&quot;)</tt> returns the width of your terminal and <tt>peek(&quot;screenheight&quot;)</tt> its height.</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
424
-clear screen
425
-maxx=peek(&quot;screenwidth&quot;)-1:maxy=peek(&quot;screenheight&quot;)-1
426
-for x=0 to maxx
427
-  print at(x,maxy*(0.5+sin(2*pi*x/maxx)/2)) &quot;*&quot;
428
-next x
429
-          </pre><p>This example plots a full period of the sine-function across the screen.</p></div></div><div class="refsect1"><h2>See also</h2><p><a href="#ref_print" title="print"><tt>print</tt></a>, <a href="#ref_clear_screen" title="clear screen"><tt>clear screen</tt></a>, <a href="#ref_color" title="color"><tt>color</tt></a></p></div></div><div class="refentry"><h1 class="title"><a name="ref_atan"></a>atan()</h1><div class="refnamediv"><h2>Name</h2><p>atan() &#8212; returns the arcus tangens of its numeric argument</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
430
-angle=atan(a,b)
431
-angle=atan(a)
432
-</pre></div><div class="refsect1"><h2>Description</h2><p>The <tt>atan</tt> is the arcus-tangens-function, i.e. the inverse of the <a href="#ref_tan" title="tan()"><tt>tan</tt></a>-function. Or, more elaborate: It Returns the angle (in radian, not degree !), which, fed to the <tt>tan</tt>-function will produce the argument passed to the <tt>atan</tt>-function.</p><p>The <tt>atan</tt>-function has a second form, which accepts two arguments: <tt>atan(a,b)</tt> which is (mostly) equivilantly to <tt>atan(a/b)</tt> <span class="emphasis"><i>except</i></span> for the fact, that the two-argument-form returns an angle in the range -&#960; to &#960;, whereas the one-argument-form returns an angle in the range -&#960;/2 to &#960;/2. To understand this you have to be good at math.</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
433
-print atan(1),atan(tan(pi)),atan(-0,-1),atan(-0,1)
434
-          </pre><p>This will print <tt>0.463648 2.06823e-13 -3.14159 3.14159</tt> which is &#960;/4, almost 0, -&#960; and &#960; respectively.</p></div></div><div class="refsect1"><h2>See also</h2><p><tt><a href="#ref_tan" title="tan()">tan</a></tt>, <tt><a href="#ref_sin" title="sin()">sin</a></tt></p></div></div></div><div class="sect1"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="ref_b"></a>B</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="#ref_beep">beep</a> - ring the bell within your computer; a synonym for bell</dt><dt><a href="#ref_bell">bell</a> - ring the bell within your computer (just as beep)</dt><dt><a href="#ref_bin">bin$()</a> - converts a number into a sequence of binary digits</dt><dt><a href="#ref_bind">bind()</a> - Binds a yabasic-program and the yabasic-interpreter together into a standalone program.</dt><dt><a href="#ref_box">box</a> - draw a rectancle. A synonym for rectangle</dt><dt><a href="#ref_break">break</a> - breaks out of a switch statement or a loop</dt></dl></div><div class="refentry"><h1 class="title"><a name="ref_beep"></a>beep</h1><div class="refnamediv"><h2>Name</h2><p>beep &#8212; ring the bell within your computer; a synonym for <tt>bell</tt></p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">beep</pre></div><div class="refsect1"><h2>Description</h2><p>The <tt>bell</tt>-command rings the bell within your computer once. This command is <span class="emphasis"><i>not</i></span> a sound-interface, so you can neither vary the length or the height of the sound (technically, it just prints <tt>\a</tt>). <tt>bell</tt> is exactly the same as <tt><a href="#ref_beep" title="beep">beep</a></tt>.</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
435
-beep:print &quot;This is a problem ...&quot;
436
-          </pre></div></div><div class="refsect1"><h2>See also</h2><p><tt><a href="#ref_beep" title="beep">beep</a></tt></p></div></div><div class="refentry"><h1 class="title"><a name="ref_bell"></a>bell</h1><div class="refnamediv"><h2>Name</h2><p>bell &#8212; ring the bell within your computer (just as <tt>beep</tt>)</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">bell</pre></div><div class="refsect1"><h2>Description</h2><p>The <tt>beep</tt>-command rings the bell within your computer once. <tt>beep</tt> is a synonym for <tt><a href="#ref_bell" title="bell">bell</a></tt>.</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
437
-print &quot;This is a problem ...&quot;:beep
438
-          </pre></div></div><div class="refsect1"><h2>See also</h2><p><tt><a href="#ref_bell" title="bell">bell</a></tt></p></div></div><div class="refentry"><h1 class="title"><a name="ref_bin"></a>bin$()</h1><div class="refnamediv"><h2>Name</h2><p>bin$() &#8212; converts a number into a sequence of binary digits</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">hexadecimal$=bin$(decimal)</pre></div><div class="refsect1"><h2>Description</h2><p>The <tt>bin$</tt>-function takes a single numeric argument an converts it into a string of binary digits (i.e. zeroes and ones). If you pass a negative number to <tt>bin$</tt>, the resulting string will be preceeded by a '-'.</p><p>If you want to convert the other way around (i.e. from binary to decimal) you may use the <tt><a href="#ref_dec" title="dec()">dec</a></tt>-function.</p></div><div class="refsect1"><h2>Example</h2><div class="informalexample"><pre class="programlisting">
439
-for a=1 to 100
440
-  print bin$(a)
441
-next a
442
-          </pre><p>This example prints the binary representation of all digits between 1 and 100.</p></div></div><div class="refsect1"><h2>See