added Item$ = "__SmIC__="+FileName$ to COLUMNBOX ADD, add a filemode: r+ ( read/write )

This commit is contained in:
Jim
2015-05-05 21:04:32 -07:00
parent cd2a1ddb30
commit 83339084fe
13 changed files with 639 additions and 348 deletions

View File

@@ -123,6 +123,7 @@ COLUMNBOX COLUMN ColumnBox$, Name$, Position, MaxWidth, MinWidth, Width, Option$
COLUMNBOX ADD ColumnBox$, Column, Row, Height, Item$ COLUMNBOX ADD ColumnBox$, Column, Row, Height, Item$
If Item$ = "__Icon__="+FileName$ then the image file FileName$ will be shown, If Item$ = "__Icon__="+FileName$ then the image file FileName$ will be shown,
if Item$ = "__Path__="+FileName$ then the large Trackericon of the file FileName$ will be shown if Item$ = "__Path__="+FileName$ then the large Trackericon of the file FileName$ will be shown
if Item$ = "__SmIC__="+FileName$ then the small Trackericon of the file FileName$ will be shown
if Item$ = "__Mime__="+Signature$ then the small icon of the mime type Signature$ will be shown if Item$ = "__Mime__="+Signature$ then the small icon of the mime type Signature$ will be shown
COLUMNBOX SELECT ColumnBox$, Row COLUMNBOX SELECT ColumnBox$, Row
Selects Row of ColumnBox$. Selects Row of ColumnBox$.

View File

@@ -47,7 +47,7 @@ GPP_OPT = $(DBG) $(OPT) -I. -DHAVE_CONFIG -DUNIX $(HAIKUOPT)
## Libraries ## Libraries
## ##
##LIBPATH = -L/boot/home/config/lib ##LIBPATH = -L/boot/home/config/lib
LIBPATHS = $(shell findpaths B_FIND_PATH_LIB_DIRECTORY) LIBPATHS = $(shell findpaths -a `getarch` B_FIND_PATH_LIB_DIRECTORY)
LIBPATH=$(addprefix -L,$(LIBPATHS)) LIBPATH=$(addprefix -L,$(LIBPATHS))
##LIBPATH = -L`finddir B_SYSTEM_LIB_DIRECTORY` ##/boot/system/lib ##LIBPATH = -L`finddir B_SYSTEM_LIB_DIRECTORY` ##/boot/system/lib
LIB = -lbe -lroot -ltranslation -ltracker -lmedia LIB = -lbe -lroot -ltranslation -ltracker -lmedia

View File

@@ -277,14 +277,45 @@ void BYabField::SetString(const char* val, int height)
fString.CopyInto(myPath, 9, fString.Length()-9); fString.CopyInto(myPath, 9, fString.Length()-9);
#ifdef ZETA #ifdef ZETA
fBitmap = new BBitmap(BRect(0, 0, 15, 15), B_RGBA32); fBitmap = new BBitmap(BRect(0, 0, 15, 15), B_RGBA32);
BEntry fEntry = BEntry( myPath.String() ); BEntry fEntry = BEntry(myPath.String());
BBitmap icon = &GetTrackerIcon(fEntry, 16); BBitmap icon = &GetTrackerIcon(fEntry, 16);
*fBitmap = icon; *fBitmap = icon;
#else #else
fBitmap = new BBitmap(BRect(0, 0, 31, 31), B_RGBA32); fBitmap = new BBitmap(BRect(0, 0,31, 31), B_RGBA32);
BNode *fNode = new BNode(myPath.String()); BNode *fNode = new BNode(myPath.String());
BNodeInfo fInfo(fNode); BNodeInfo fInfo(fNode);
fInfo.GetTrackerIcon(fBitmap, B_LARGE_ICON); int i;
i=32;
icon_size ics;
ics=(icon_size)i;
fInfo.GetTrackerIcon( fBitmap, ics );
//fInfo.GetTrackerIcon(fBitmap, B_MINI_ICON);
delete fNode;
#endif
}
else if( ! fString.FindFirst("__SmIC__=") )
{
BString myPath;
fString.CopyInto(myPath, 9, fString.Length()-9);
#ifdef ZETA
fBitmap = new BBitmap(BRect(0, 0, 15, 15), B_RGBA32);
BEntry fEntry = BEntry(myPath.String());
BBitmap icon = &GetTrackerIcon(fEntry, 16);
*fBitmap = icon;
#else
fBitmap = new BBitmap(BRect(0, 0, 15, 15), B_RGBA32);
BNode *fNode = new BNode(myPath.String());
BNodeInfo fInfo(fNode);
int i;
i=16;
icon_size ics;
ics=(icon_size)i;
fInfo.GetTrackerIcon( fBitmap, ics );
//fInfo.GetTrackerIcon(fBitmap, B_MINI_ICON);
delete fNode; delete fNode;
#endif #endif
} }

View File

@@ -707,7 +707,7 @@ void function(struct command *current,YabInterface* yab) /* performs a function
case fTELL: case fTELL:
i=(int)(a1->value); i=(int)(a1->value);
if (badstream(i,0)) return; if (badstream(i,0)) return;
if (!(stream_modes[i] & (smREAD | smWRITE))) { if (!(stream_modes[i] & (smREAD | smWRITE| smREADWRITE))) {
sprintf(string,"stream %d not opened",i); sprintf(string,"stream %d not opened",i);
error(ERROR,string); error(ERROR,string);
value=0; value=0;
@@ -1681,7 +1681,7 @@ static double peek(char *dest, YabInterface *yab) /* peek into internals */
static int peekfile(int stream) /* read a byte from stream */ static int peekfile(int stream) /* read a byte from stream */
{ {
if (stream && badstream(stream,0)) return 0; if (stream && badstream(stream,0)) return 0;
if (stream && !(stream_modes[stream] & smREAD)) { if (stream && !(stream_modes[stream] & smREAD | smREADWRITE)) {
sprintf(string,"stream %d not open for reading",stream); sprintf(string,"stream %d not open for reading",stream);
error(ERROR,string); error(ERROR,string);
return 0; return 0;

View File

@@ -626,17 +626,17 @@ void myopen(struct command *cmd) /* open specified file for given name */
char *name=NULL; char *name=NULL;
char *mode=NULL; char *mode=NULL;
char **pmode; char **pmode;
static char *valid_modes[]={"r","w","a","rb","wb","ab",""}; static char *valid_modes[]={"r+","r","w","a","rb","wb","ab",""};
static int smodes[]={smREAD,smWRITE,smWRITE,smREAD,smWRITE,smWRITE}; static int smodes[]={smREADWRITE,smREAD,smWRITE,smWRITE,smREAD,smWRITE,smWRITE,smREAD};
int smode; int smode;
struct stackentry *p; struct stackentry *p;
int has_mode,has_stream,printer=0; int has_mode,has_stream,printer=0;
/* decode cmd->tag */ /* decode cmd->tag */
has_stream=cmd->tag&OPEN_HAS_STREAM; has_stream=cmd->tag&OPEN_HAS_STREAM;
has_mode=cmd->tag&OPEN_HAS_MODE; has_mode=cmd->tag&OPEN_HAS_MODE;
/* printer=cmd->tag&OPEN_PRINTER;*/ /* printer=cmd->tag&OPEN_PRINTER;*/
if (has_mode) if (has_mode)
mode=my_strdup(pop(stSTRING)->pointer); mode=my_strdup(pop(stSTRING)->pointer);
else else
@@ -817,7 +817,7 @@ void myseek(struct command *cmd) /* reposition file pointer */
} }
my_free(mode); my_free(mode);
if (abs(s)==STDIO_STREAM || badstream(s,0)) return; if (abs(s)==STDIO_STREAM || badstream(s,0)) return;
if (!(stream_modes[s] & (smREAD | smWRITE))) { if (!(stream_modes[s] & (smREAD | smWRITE | smREADWRITE))) {
sprintf(errorstring,"stream %d not open",s); sprintf(errorstring,"stream %d not open",s);
errorcode=11; errorcode=11;
return; return;
@@ -906,7 +906,7 @@ int checkstream(void) /* test if currst is still valid */
input=(currstr>0); input=(currstr>0);
if (!stdio) { if (!stdio) {
if (input && !(stream_modes[abs(currstr)] & smREAD)) { if (input && !(stream_modes[abs(currstr)] & smREAD| smREADWRITE)) {
sprintf(string,"stream %d not open for reading",abs(currstr)); sprintf(string,"stream %d not open for reading",abs(currstr));
error(ERROR,string); error(ERROR,string);
return FALSE; return FALSE;

View File

@@ -26,9 +26,7 @@ can be found at www.yabasic.de
/* ------------- defines ---------------- */ /* ------------- defines ---------------- */
#define DONE {current=current->next;break;} /* reduces type-work */ #define DONE {current=current->next;break;} /* reduces type-work */
#define COPYRIGHT "original yabasic Copyright 1995-2006 by Marc-Oliver Ihm\n #define COPYRIGHT "original yabasic Copyright 1995-2006 by Marc-Oliver Ihm\n\tyab improvements Copyright 2006-2014 by Jan Bungeroth\n\tyab improvements Copyright 2013-2015 by Jim Saxton\n"
\tyab improvements Copyright 2006-2014 by Jan Bungeroth\n
\tyab improvements Copyright 2013-2015 by Jim Saxton\n"
#define BANNER \ #define BANNER \
"\n yab is yabasic for Haiku. This is version " VERSION ",\n built on "\ "\n yab is yabasic for Haiku. This is version " VERSION ",\n built on "\
ARCHITECTURE " on " BUILD_TIME "\n\n " COPYRIGHT "\n\n" ARCHITECTURE " on " BUILD_TIME "\n\n " COPYRIGHT "\n\n"
@@ -920,7 +918,7 @@ static void initialize(void)
stream_modes[i]=smCLOSED; stream_modes[i]=smCLOSED;
} }
streams[0]=stdin; streams[0]=stdin;
stream_modes[0]=smREAD | smWRITE; stream_modes[0]=smREAD | smWRITE | smREADWRITE;
#ifdef UNIX #ifdef UNIX
/* printerfile=NULL; /* no ps-file yet */ /* printerfile=NULL; /* no ps-file yet */
#endif #endif

View File

@@ -287,7 +287,7 @@ enum endreasons { /* ways to end the program */
}; };
enum streammodes { /* ways to access a stream */ enum streammodes { /* ways to access a stream */
smCLOSED=0,smREAD=1,smWRITE=2,smPRINT=4 smCLOSED=0,smREAD=1,smWRITE=2,smPRINT=4,smREADWRITE=3
}; };
enum functions { /* functions in yabasic (sorted by number of arguments) */ enum functions { /* functions in yabasic (sorted by number of arguments) */

View File

@@ -0,0 +1,62 @@
import fileblock
x=openfile("/boot/home/test.file", 150,3)
if x < 1 error "cannot open file"
ok=Field(x,1,"name",50)
ok=ok+Field(x,2,"address",50)
ok=ok+Field(x,3,"phonenumber",50)
if (!ok = 3 ) error "bad field"
// werite some blocks
for z=1 to 20
lset(x,"name", "Some dude")
lset(x,"address", "Some address")
rset(x,"phonenumber","123-456-7890")
y=write_block(-1, x) // -1 appends the data to the file.
next
// over-write a block with new data
lset(x,"name", "Some other dude")
lset(x,"address", "Some kewl address")
rset(x,"phonenumber","098-765-4321")
write_block(6, x)
// read back the over-written block
read_block(6, x)
// get the data from the read operation
name$=readfield$(x, "name")
address$=readfield$(x, "address")
phone$=readfield$(x, "phonenumber")
// show the data
print name$
print address$
print trim$(phone$)
// over write the block again
lset(x,"name", "")
lset(x,"address", "")
rset(x,"phonenumber","")
write_block(6, x)
//read back the over-written block
recno = read_block(6, x) // returns the read block that will next be read if called with -1 recordnumber
name$=readfield$(x, "name")
address$=readfield$(x, "address")
phone$=readfield$(x, "phonenumber")
print name$
print address$
print phone$
print recno
//read the next block
recno = read_block(-1, x)
name$=readfield$(x, "name")
address$=readfield$(x, "address")
phone$=readfield$(x, "phonenumber")
print name$
print address$
print phone$
print recno

View File

@@ -1,9 +1,12 @@
#!yab
import Filebox import Filebox
dir$ = "/boot/home/" dir$ = "/boot/home/"
window open 100,100 to 500,500, "Demo","Demo" window open 100,100 to 500,500, "Demo",dir$
Filebox(10,10,350,390,"Filebox", 1, "Demo") Filebox(10,10,350,390,"Filebox", 1, "Demo")
FileboxDirectory("Filebox", dir$, false) FileboxDirectory("Filebox", dir$, false)
button 360,10,390,30, "DirUp", "..", "Demo" button 360,10,390,30, "DirUp", "..", "Demo"
@@ -13,6 +16,7 @@ inloop = true
while(inloop) while(inloop)
n = split(message$, msg$(), "|") n = split(message$, msg$(), "|")
for i=1 to n for i=1 to n
print msg$(i)
// Quit // Quit
if(msg$(i) = "Demo:_QuitRequested") inloop = false if(msg$(i) = "Demo:_QuitRequested") inloop = false
@@ -23,7 +27,9 @@ while(inloop)
t = t - 1 t = t - 1
wend wend
dir$ = left$(dir$,t) dir$ = left$(dir$,t)
WINDOW SET "Demo", "Title", dir$
FileboxDirectory("Filebox", dir$, false) FileboxDirectory("Filebox", dir$, false)
endif endif
// An item is invoked // An item is invoked
@@ -31,11 +37,12 @@ while(inloop)
position = val(right$(msg$(i),len(msg$(i))-16)) position = val(right$(msg$(i),len(msg$(i))-16))
// if the item is a directory, then update the filebox else print the filename // if the item is a directory, then update the filebox else print the filename
if(FileboxIsDirectory("Filebox", position)) then if(FileboxIsDirectory("Filebox", position,dir$)) then
dir$ = dir$ + FileboxName$("Filebox", position) + "/" dir$ = dir$ + FileboxName$("Filebox", position) + "/"
WINDOW SET "Demo", "Title", dir$
FileboxDirectory("Filebox", dir$, false) FileboxDirectory("Filebox", dir$, false)
else else
print FileboxName$("Filebox", position) print dir$+FileboxName$("Filebox", position)
endif endif
endif endif
next i next i

View File

@@ -26,10 +26,12 @@ export sub FileboxName$(ID$, position)
end sub end sub
// return true, if the row position is a directory // return true, if the row position is a directory
export sub FileboxIsDirectory(ID$, position) export sub FileboxIsDirectory(ID$, position,dir$)
local t$ local t$
t$ = columnbox get$ ID$, 1, position t$ = columnbox get$ ID$, 2, position
if(t$ = "__Mime__=application/x-vnd.Be-directory") return true print "t$ "+t$
//if(t$ = "__Path__="+path$+Name$"__Mime__=application/x-vnd.Be-directory") return true
if(system("test -d \""+ dir$+t$+"\"") = 0) system("addattr -t mime BEOS:TYPE application/x-vnd.Be-directory \""+dir$+t$+"\"") : return true
return false return false
end sub end sub
@@ -50,48 +52,65 @@ export sub FileboxDirectory(ID$, dir$, showDot)
columnbox clear ID$ columnbox clear ID$
if(showDot) then if(showDot) then
t$ = system$("ls --format=single-column --color=none -a "+dir$+" |sort -f") t$ = system$("ls --format=single-column --color=none -aF \""+dir$+"\" |sort -f")
else else
t$ = system$("ls --format=single-column --color=none "+dir$+" |sort -f") t$ = system$("ls --format=single-column --color=none -F \""+dir$+"\" |sort -f")
endif endif
dim splitdir$(1) dim splitdir$(1)
n = split(t$, splitdir$(), "\n") n = split(t$, splitdir$(), "\n")
for i=1 to n-1 for i=1 to n-1
if(system("test -d \""+ dir$+splitdir$(i)+"\"") = 0) then
//print dir$+splitdir$(i)
//print dir$+splitdir$(i)
if (right$(splitdir$(i),1)="/") then
//if(system("test -d \""+ dir$+splitdir$(i)+"\"") = 0) then
// comment the if clause out if you want to have the direcotries "." and ".." listed // comment the if clause out if you want to have the direcotries "." and ".." listed
if(splitdir$(i)<>"." and splitdir$(i)<>"..") then // if(splitdir$(i)<>"." and splitdir$(i)<>"..") then
arraysizeDir = arraysizeDir + 1 arraysizeDir = arraysizeDir + 1
dim directories$(arraysizeDir) dim directories$(arraysizeDir)
directories$(arraysizeDir-1) = splitdir$(i) splitdir$(i) = left$(splitdir$(i),len( splitdir$(i))-1)
endif directories$(arraysizeDir-1) = splitdir$(i)
//endif
// handle files // handle files
else else
arraysizeFiles = arraysizeFiles + 1 arraysizeFiles = arraysizeFiles + 1
dim files$(arraysizeFiles) dim files$(arraysizeFiles)
files$(arraysizeFiles-1) = splitdir$(i) files$(arraysizeFiles-1) = splitdir$(i)
endif endif
next i next i
for i=0 to arraysizeDir-1 for i=0 to arraysizeDir-1
FileboxAdd(ID$, directories$(i), true) FileboxAdd(ID$, directories$(i), true,dir$)
next i next i
for i=0 to arraysizeFiles-1 for i=0 to arraysizeFiles-1
FileboxAdd(ID$, files$(i), false) FileboxAdd(ID$, files$(i), false,dir$)
next i next i
return return
end sub end sub
sub FileboxAdd(ID$, Name$, IsFolder) sub FileboxAdd(ID$, Name$, IsFolder, path$)
local maxpos local maxpos
maxpos = (columnbox count ID$) + 1 maxpos = (columnbox count ID$) + 1
a$=""
if(IsFolder) then if(IsFolder) then
columnbox add ID$, 1, maxpos, 18, "__Mime__=application/x-vnd.Be-directory" columnbox add ID$, 1, maxpos, 18, "__SmIC__="+path$+Name$
else else
columnbox add ID$, 1, maxpos, 18, "__Mime__=application/octet-stream" columnbox add ID$, 1, maxpos, 18, "__SmIC__="+path$+Name$
//else
//columnbox add ID$, 1, maxpos, 18, "__Mime__=application/octet-stream"
endif endif
columnbox add ID$, 2, maxpos, 20, Name$ columnbox add ID$, 2, maxpos, 20, Name$
columnbox select ID$, 1
columnbox select ID$, 0
return return
end sub end sub

View File

@@ -0,0 +1,168 @@
export sub openfile(filename$, recordlength, numberoffields)
// specify the record(block) length and number of fields for the file
// returns the filehandle number used for other subs
static numfiles
x=open(filename$, "a")
if x=0 return 0 // error opening the file
close x
numfiles=numfiles+1
dim f$(numfiles,50,2) // f$(numfile,1-50=fieldname$
dim f(numfiles,52)
f$(numfiles,0,0)=filename$
f(numfiles,51)=recordlength
f(numfiles,52)=numberoffields
return numfiles
end sub
export sub Field( filehandle,fieldnumber, fieldname$, fieldlength)
//specify the field name and length for the field numbered fieldnumber
if fieldnumber <= f(filehandle,52) then
f$(filehandle,fieldnumber,0)=fieldname$
f(filehandle,fieldnumber)=fieldlength
f$(filehandle,fieldnumber,1)=blank$(f(filehandle,fieldnumber))
return 1
endif
return 0
end sub
export sub lset(filehandle,fieldname$,data$)
//sets data$ on the left end of the field, truncates the string if it is longer than the fieldlength
//use this to prepare the record for writing
l=len(data$)
x=0
for x=1 to 50
b$=f$(filehandle,x,0)
if (b$ = fieldname$) then
lf=f(filehandle,x)
dt$=data$
if( l > lf )dt$=left$(dt$,lf)
a$=blank$(lf-l)
if l<lf dt$=dt$+a$
f$(filehandle,x,1) = dt$
end if
next
end sub
export sub rset(filehandle,fieldname$,data$)
//sets data$ on the right end of the field, truncates the string if it is longer than the fieldlength
//use this to prepare the record for writing
l=len(data$)
x=0
for x=1 to 50
b$=f$(filehandle,x,0)
if (b$ = fieldname$) then
lf=f(filehandle,x)
dt$=data$
if( l > lf )dt$=left$(dt$,lf)
a$=blank$(lf-l)
if l<lf dt$=a$+dt$
f$(filehandle,x,1) = dt$
end if
next
end sub
export sub readfield$(File, fieldname$)
//returns the data held in fieldname$
local x
for x=1 to 50
if f$(File,x,0)=fieldname$ then
return f$(File,x,1)
end if
next
end sub
export sub write_block(recordnumber, filehandle)
// Writes all the fields to the file at this record location
// Uses seek recordnumber*recordlength before the write
// Clears the field data
// Recordnumbers start at 0. ie the first record is 0, the second is 1 etc.
filename$=f$(filehandle,0,0)
x=open(filename$, "r+")
if x=0 print "error":return 0 // error opening the file
if recordnumber = -1 then
seek x, 0, "end" // append data to the file
else
seek x, ((f(filehandle,51) +1) * (recordnumber))
endif
printstring$=""
for y=1 to f(filehandle,52)
printstring$=printstring$+f$(filehandle,y,1)
next
l=len(printstring$)
for y=1 to l
a$=left$(printstring$,1)
printstring$=right$(printstring$,len(printstring$)-1)
poke x, a$
next
poke x ,"\n"
for y=1 to f(filehandle,52)
f$(filehandle,y,1)=blank$(f(filehandle,y))
next
close x
end sub
export sub read_block(recordnumber, filehandle)
// Reads the data at this record, or the next record if recordnumber is -1
// Ffills the fields with the data
// Recordnumbers start at 0. ie the first record is 0, the second is 1 etc.
static rec
File=open(filename$, "rb")
if File=0 print "error":return -1 // error opening the file
if (recordnumber <> -1) then
rec = recordnumber
seek File, ((f(filehandle,51) +1) * (rec))
endif
a$=""
for z=1 to f(filehandle,51)
y=peek(File)
a$=a$+chr$(y)
next
for y=0 to f(filehandle,52)
f$(filehandle,y,1)= left$(a$,f(filehandle,y))
a$=right$(a$,len(a$)-f(filehandle,y))
next
rec=rec+1
return rec
end sub
sub blank$(num)
local s$
local x
s$=""
for x=1 to num
s$=s$+" "
next
return s$
end sub

View File

@@ -3436,6 +3436,7 @@ open -- open a file
Synopsis: Synopsis:
open a,"file","r" open a,"file","r"
open a, "File", "r+"
open #a,"file","w" open #a,"file","w"
open "file" for reading as a open "file" for reading as a
open "file" for writing as #a open "file" for writing as #a
@@ -3450,7 +3451,11 @@ The open-command opens a file for reading or writing for printing text. open com
For historical reasons the filenumber can be preceded by a hash ('#'). Note, that specifying a filenumber is optional; if it is omitted, the open-function will return a filenumber, which should then be stored in a variable for later reference. This filenumber can be a simple number or an arbitrary complex arithmetic expression, in which case braces might be necessary to save yab from getting confused. For historical reasons the filenumber can be preceded by a hash ('#'). Note, that specifying a filenumber is optional; if it is omitted, the open-function will return a filenumber, which should then be stored in a variable for later reference. This filenumber can be a simple number or an arbitrary complex arithmetic expression, in which case braces might be necessary to save yab from getting confused.
filename -- In the synopsis above this is "file". This string specifies the name of the file to open (note the important caveat on specifying these filenames). filename -- In the synopsis above this is "file". This string specifies the name of the file to open (note the important caveat on specifying these filenames).
accessmode -- In the synopsis this is "r", "w", for reading or for writing. This string or clause specifies the mode in which the file is opened; it may be one of: "r"Open the file for reading (may also be written as for reading). If the file does not exist, the command will fail. This mode is the default, i.e. if no mode is specified with the open-command, the file will be opened with this mode. accessmode -- In the synopsis this is "r", "w", for reading or for writing. This string or clause specifies the mode in which the file is opened; it may be one of: "r" Open the file for reading (may also be written as for reading). If the file does not exist, the command will fail. This mode is the default, i.e. if no mode is specified with the open-command, the file will be opened with this mode.
"r" -- Open the file for reading (may also be written as for reading). If the file does not exist, the command will fail.
"r+" -- Open the file for reading and writing. If the file does not exist, it will be created. Writing is limited to poke, print #a will not work in this mode.
"w" -- Open the file for writing (may also be written as for writing). If the file does not exist, it will be created. "w" -- Open the file for writing (may also be written as for writing). If the file does not exist, it will be created.

View File

@@ -1,620 +1,620 @@
&Arithmetic &Arithmetic
7337 7340
& &
7339 7342
abs() abs()
7345 7348
acos() acos()
7712 7715
and() and()
8211 8214
asin() asin()
9001 9004
atan() atan()
9510 9513
bin$() bin$()
10409 10412
cos() cos()
11015 11018
dec() dec()
11280 11283
eor() eor()
11799 11802
euler euler
12576 12579
exp() exp()
12982 12985
frac() frac()
13604 13607
int() int()
14285 14288
log() log()
14685 14688
max() max()
15344 15347
min() min()
16136 16139
mod() mod()
16551 16554
or() or()
17264 17267
pi pi
18057 18060
ran() ran()
18513 18516
sig() sig()
19356 19359
sin() sin()
20000 20003
sqr() sqr()
20525 20528
sqrt() sqrt()
20896 20899
tan() tan()
21248 21251
xor() xor()
21611 21614
** or ^ ** or ^
22644 22647
& &
23461 23464
and and
23465 23468
break break
23915 23918
case case
24610 24613
continue continue
25107 25110
default default
25776 25779
do do
26896 26899
else else
27440 27443
elsif elsif
27979 27982
end end
29449 29452
endif endif
30141 30144
false false
30787 30790
fi fi
31354 31357
for for
31668 31671
gosub gosub
32630 32633
goto goto
33500 33503
if if
34350 34353
label label
36136 36139
loop loop
37125 37128
next next
37612 37615
not not
38171 38174
on gosub on gosub
38823 38826
on goto on goto
40158 40161
on interrupt on interrupt
41582 41585
logical or logical or
42868 42871
pause pause
43271 43274
repeat repeat
44499 44502
return return
45186 45189
sleep sleep
46885 46888
step step
47260 47263
switch switch
47800 47803
then then
49116 49119
true true
49924 49927
until until
50360 50363
wait wait
50967 50970
wend wend
51341 51344
while while
51839 51842
: :
52495 52498
& &
53132 53135
arraydim() arraydim()
53143 53146
arraysize() arraysize()
54033 54036
data data
56606 56609
dim dim
57558 57561
read read
59075 59078
redim redim
59718 59721
restore restore
60157 60160
& &
61226 61229
asc() asc()
61232 61235
chr$() chr$()
62055 62058
glob() glob()
62917 62920
abc matches a* abc matches a*
63878 63881
64066 64069
hex$() hex$()
64075 64078
instr() instr()
64565 64568
left$() left$()
65579 65582
len() len()
66880 66883
lower$() lower$()
67254 67257
ltrim$() ltrim$()
67662 67665
rtrim$() rtrim$()
68314 68317
mid$() mid$()
68962 68965
right$() right$()
70230 70233
split() split()
71549 71552
Please enter a line: a Please enter a line: a
74186 74189
74680 74683
str$() str$()
74706 74709
string | Result for converting 1000*pi | Description string | Result for converting 1000*pi | Description
76112 76115
79509 79512
token() token()
79811 79814
Please enter a line: a Please enter a line: a
82334 82337
82732 82735
trim$() trim$()
82759 82762
upper$() upper$()
83372 83375
val() val()
84020 84023
& &
84734 84737
at() at()
84739 84742
clear screen clear screen
86030 86033
close close
86746 86749
color color
87217 87220
colour colour
88331 88334
eof eof
88478 88481
getscreen$() getscreen$()
89069 89072
inkey$ inkey$
90217 90220
input input
91436 91439
Please enter the name of a file to read: test.yab Please enter the name of a file to read: test.yab
92830 92833
92967 92970
line input line input
93002 93005
open open
93844 93847
print print
96665 96974
putscreen putscreen
99902 100211
reverse reverse
100797 101106
screen screen
101576 101885
seek() seek()
101806 102115
tell tell
103368 103677
using using
104029 104338
# #
105070 105379
at() at()
106443 106752
; ;
107722 108031
& &
108368 108677
end sub end sub
108376 108685
export export
108808 109117
import foo import foo
109855 110164
110153 110462
Calling subroutine foo.bar (okay) ... Calling subroutine foo.bar (okay) ...
110254 110563
110568 110877
import import
111103 111412
rem Make the subroutine x easily available outside this library rem Make the subroutine x easily available outside this library
112034 112343
112210 112519
0 0
112259 112568
112417 112726
local local
112702 113011
numparams numparams
114162 114471
return return
115613 115922
static static
117315 117624
1 1 1 1
118117 118426
118140 118449
sub sub
118335 118644
& &
120614 120923
bind() bind()
120621 120930
clipboard copy clipboard copy
121393 121702
clipboard paste$ clipboard paste$
122095 122404
compile compile
122717 123026
date$ date$
123273 123582
doc doc
124998 125307
docu$ docu$
126153 126462
error error
126975 127284
---Error in t.yab, line 2: Oh no ... ---Error in t.yab, line 2: Oh no ...
127618 127927
127674 127983
execute$() execute$()
127688 127997
print foo$(a$,b$) print foo$(a$,b$)
128723 129032
128736 129045
execute() execute()
128776 129085
exit exit
129181 129490
iscomputeron iscomputeron
129575 129884
pause pause
129963 130272
peek peek
131190 131499
peek$ peek$
136253 136562
3a 3a
139214 139523
139235 139544
poke poke
139270 139579
rem rem
140508 140817
sleep sleep
141622 141931
system$() system$()
141981 142290
system() system()
142570 142879
thread get thread get
143193 143502
thread remove thread remove
144542 144851
time$ time$
145465 145774
to to
146634 146943
// //
147188 147497
: :
147692 148001
&Drawing &Drawing
148325 148634
& &
148327 148636
draw circle draw circle
148339 148648
draw curve draw curve
148998 149307
draw dot draw dot
149983 150292
draw ellipse draw ellipse
150564 150873
draw flush draw flush
151303 151612
draw get draw get
152433 152742
draw get$ draw get$
154379 154688
draw image draw image
155792 156101
draw line draw line
157698 158007
draw rect draw rect
158270 158579
draw set draw set
158926 159235
draw text draw text
162295 162604
& &
163465 163774
ismousein() ismousein()
163477 163786
keyboard message$() keyboard message$()
164199 164508
message$ message$
166088 166397
message send message send
168421 168730
_Scripting:...| _Scripting:...|
169326 169635
169339 169648
mouse message$() mouse message$()
169566 169875
mousemove$ mousemove$
171590 171899
MOUSE SET Option$ MOUSE SET Option$
172254 172563
shortcut shortcut
172760 173069
"S" for the shift key "S" for the shift key
173560 173869
173712 174021
"O" for ALT-O "O" for ALT-O
173862 174171
173927 174236
ALT-X ALT-X
174351 174660
174394 174703
&Printing &Printing
175345 175654
& &
175347 175656
printer printer
175355 175664
printer setup printer setup
177728 178037
& &
178752 179061
menu menu
178757 179066
Menu$ = "--" Menu$ = "--"
179225 179534
then the menu item will be a separator line. then the menu item will be a separator line.
179282 179591
"S" for the shift key "S" for the shift key
179755 180064
These modifiers can be combined, but the following combinations do not work: "SO", "SC" and "SCO" These modifiers can be combined, but the following combinations do not work: "SO", "SC" and "SCO"
180004 180313
"O" for ALT-O "O" for ALT-O
180055 180364
180120 180429
For the menu Head$ "File": For the menu Head$ "File":
180918 181227
181168 181477
menu set menu set
182260 182569
Option$ = "Disable" -- grey out the item so it cannot be selected anymore Option$ = "Disable" -- grey out the item so it cannot be selected anymore
183063 183372
183212 183521
popupmenu popupmenu
184323 184632
submenu submenu
185971 186280
Menu$ = "--" Menu$ = "--"
186555 186864
then the submenu item will be a separator line. then the submenu item will be a separator line.
186615 186924
"S" for the shift key "S" for the shift key
187091 187400
These modifiers can be combined, but the following combinations do not work: "SO", "SC" and "SCO" These modifiers can be combined, but the following combinations do not work: "SO", "SC" and "SCO"
187340 187649
"O" for ALT-O "O" for ALT-O
187391 187700
187456 187765
submenu set submenu set
190342 190651
Option$ = "Disable" -- grey out the item so it cannot be selected anymore Option$ = "Disable" -- grey out the item so it cannot be selected anymore
191218 191527
191367 191676
& &
192114 192423
boxview boxview
192122 192431
stackview stackview
193545 193854
stackview get stackview get
195659 195968
stackview set stackview set
195950 196259
& &
196407 196716
button button
196414 196723
button image button image
197729 198038
calendar calendar
199470 199779
calendar get$ calendar get$
201137 201446
calendar set calendar set
201630 201939
checkbox checkbox
202055 202364
checkbox image checkbox image
203312 203621
checkbox set checkbox set
205539 205848
colorcontrol colorcontrol
205838 206147
colorcontrol get colorcontrol get
207860 208169
colorcontrol set colorcontrol set
208468 208777
columnbox columnbox
208804 209113
columnbox add columnbox add
214014 214323
columnbox clear columnbox clear
215195 215504
columnbox color columnbox color
215563 215872
columnbox column columnbox column
216608 216917
columnbox count columnbox count
217767 218076
columnbox get columnbox get
218205 218514
columnbox get$ columnbox get$
218740 219049
columnbox remove columnbox remove
219283 219592
columnbox select columnbox select
219640 219949
listbox listbox
220095 220404
listbox add listbox add
223060 223369
listbox clear listbox clear
223538 223847
listbox count listbox count
223833 224142
listbox get listbox get
224229 224538
listbox get$ listbox get$
224716 225025
listbox remove listbox remove
225134 225443
listbox select listbox select
225473 225782
listbox sort listbox sort
226118 226427
radiobutton radiobutton
226830 227139
radiobutton set radiobutton set
228564 228873
statusbar statusbar
228970 229279
statusbar set statusbar set
230439 230748
text text
230937 231246
text set text set
232125 232434
textedit textedit
233243 233552
textedit add textedit add
233536 233845
textedit clear textedit clear
233748 234057
textedit color textedit color
234090 234399
textedit get textedit get
234392 234701
textedit get$ textedit get$
234747 235056
textedit set textedit set
235021 235330
tooltip tooltip
237966 238275
tooltip color tooltip color
239646 239955
&Localization &Localization
240934 241243
& &
240936 241245
localize localize
240945 241254
# A comment starts with a # # A comment starts with a #
242509 242818
242633 242942
translate$() translate$()
244199 244508
&Sound &Sound
244952 245261
& &
244954 245263
beep beep
244959 245268
bell bell
245193 245502
sound play sound play
245556 245865
sound stop sound stop
246481 246790
sound wait sound wait
246855 247164
&Window &Window
247260 247569
& &
247262 247571
alert alert
247268 247577
filepanel filepanel
249046 249355
window open window open
252336 252645
window close window close
255051 255360
window count window count
255543 255852
window get window get
256170 256479
window set window set
257891 258200