"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "bas.1.in" between
bas-2.5.tar.gz and bas-2.6.tar.gz

About: bas is an interpreter for the programming language BASIC.

bas.1.in  (bas-2.5):bas.1.in  (bas-2.6)
skipping to change at line 61 skipping to change at line 61
end of the program. If the end of the program. If the
first line of a program file begins with \fB#!\fP, it is ignored by first line of a program file begins with \fB#!\fP, it is ignored by
the interpreter. the interpreter.
.\"}}} .\"}}}
.SS "Statements" \"{{{ .SS "Statements" \"{{{
Each line of a BASIC program contains one or more of the statements below. Each line of a BASIC program contains one or more of the statements below.
Multiple statements are grouped by a colon (\fB:\fP) in between them. Multiple statements are grouped by a colon (\fB:\fP) in between them.
Brackets (\fB[\fP and \fB]\fP) are converted to parentheses when loading Brackets (\fB[\fP and \fB]\fP) are converted to parentheses when loading
a program for compatibility with dialects that use them e.g. to indicate a program for compatibility with dialects that use them e.g. to indicate
array indices. array indices.
.IP "[\fBcall\fP] \fIfunction\fP[\fB(\fP\fIargument\fP{\fB,\fP \fIargument\fP\fB .IP "\fIvariable\fP[\fB(\fP\fIargument\fP{\fB,\fP \fIargument\fP}\fB)\fP] = \fIe
)\fP]" \"{{{ xpression\fP" \"{{{
Assign the value of the function to the variable.
.\"}}}
.IP "[\fBcall\fP] \fIfunction\fP[\fB(\fP\fIargument\fP{\fB,\fP \fIargument\fP}\f
B)\fP]" \"{{{
Call the \fIfunction\fP or procedure. The ANSI syntax requires the Call the \fIfunction\fP or procedure. The ANSI syntax requires the
keyword \fBcall\fP, whereas other BASIC dialects don't. In \fBbas\fP, keyword \fBcall\fP, whereas other BASIC dialects don't. In \fBbas\fP,
\fBcall\fP is optional. \fBcall\fP is optional.
.\"}}} .\"}}}
.IP "\fBchdir\fP \fIdirectory$\fP" \"{{{ .IP "\fBchdir\fP \fIdirectory$\fP" \"{{{
Change the current directory to \fIdirectory$\fP. Change the current directory to \fIdirectory$\fP.
.\"}}} .\"}}}
.IP "\fBclear\fP" \"{{{ .IP "\fBclear\fP" \"{{{
Set all numerical variables to 0 and all string variables to the empty string. Set all numerical variables to 0 and all string variables to the empty string.
All arrays lose their dimension and geometry. All files are closed. All arrays lose their dimension and geometry. All files are closed.
skipping to change at line 214 skipping to change at line 217
.\"}}} .\"}}}
.IP "\fBfield\fP [\fB#\fP]\fIchannel%\fP\fB,\fP\fIwidth\fP \fBas\fP \fIlvalue$\f P {\fB,\fP\fIwidth\fP \fBas\fP \fIlvalue$\fP}" \"{{{ .IP "\fBfield\fP [\fB#\fP]\fIchannel%\fP\fB,\fP\fIwidth\fP \fBas\fP \fIlvalue$\f P {\fB,\fP\fIwidth\fP \fBas\fP \fIlvalue$\fP}" \"{{{
Allocate \fIwidth\fP bytes in the record buffer to the \fIlvalue$\fP. Allocate \fIwidth\fP bytes in the record buffer to the \fIlvalue$\fP.
The total number of allocated bytes must not exceed the record length. The total number of allocated bytes must not exceed the record length.
The same record buffer can be allocated to different lvalues The same record buffer can be allocated to different lvalues
by using multiple field statements. Fielded lvalues must be set by using multiple field statements. Fielded lvalues must be set
with \fBlset\fP and \fBrset\fP. Simple assignments to them will cause with \fBlset\fP and \fBrset\fP. Simple assignments to them will cause
different storage to be allocated to them, thus not effecting the random different storage to be allocated to them, thus not effecting the random
access buffer. access buffer.
.\"}}} .\"}}}
.IP "\fBfiles\fP [\fIpattern$\fP]" \"{{{
Run \fBls \-l\fP with the file specification as argument.
Only the meta characters \fB*?[]\fP are passed through.
.\"}}}
.IP "\fBfor\fP \fIlvalue\fP \fB=\fP \fIexpression\fP \fBto\fP \fIexpression\fP [ \fBstep\fP \fIexpression\fP]" \"{{{ .IP "\fBfor\fP \fIlvalue\fP \fB=\fP \fIexpression\fP \fBto\fP \fIexpression\fP [ \fBstep\fP \fIexpression\fP]" \"{{{
.IP "\fBnext\fP \fIlvalue\fP{\fB,\fP\fIlvalue\fP}" .IP "\fBnext\fP \fIlvalue\fP{\fB,\fP\fIlvalue\fP}"
The \fBfor\fP loop performs the initial variable assignment and then The \fBfor\fP loop performs the initial variable assignment and evaluates
executes the statements inside the loop, if the variable is lower or equal the \fBstep\fP \fIexpression\fP, storing the value. Then it executes the
than the limit (or greater than for negative steps). The \fBnext\fP statements inside the loop, if the variable is lower or equal than the
statement verifies if the variable already reached the value of the limit (or greater than for negative steps). The \fBnext\fP statement
\fBto\fP \fIexpression\fP. If not, it increments if by the value of verifies if the variable already reached the value of the \fBto\fP
the \fBstep\fP \fIexpression\fP and causes a new repetition. A missing \fIexpression\fP. If not, it increments if by the evaluated \fBstep\fP
\fBstep\fP \fIexpression\fP is treated as \fBstep 1\fP. The \fBnext\fP value and causes a new repetition. A missing \fBstep\fP \fIexpression\fP
statement may be followed by a list of lvalues. Due to the dynamic variable is treated as \fBstep 1\fP. The \fBnext\fP statement may be followed
geometry, the lvalues themselves by a list of lvalues. Due to the dynamic variable geometry, the lvalues
are only checked for belonging to the same variable as those in \fBfor\fP. themselves are only checked for belonging to the same variable as those
If no lvalues are given, the in \fBfor\fP. If no lvalues are given, the innermost loop is terminated.
innermost loop is terminated. For loops can be left by \fBexit for\fP. For loops can be left by \fBexit for\fP. Note: That statement is not
Note: That statement is not offered by all BASIC dialects and most restrict offered by all BASIC dialects and most restrict loop variables to scalar
loop variables to scalar variables. variables.
.\"}}} .\"}}}
.IP "\fBget\fP [\fB#\fP]\fIchannel%\fP [\fB,\fP\fIrecord\fP]" \"{{{ .IP "\fBget\fP [\fB#\fP]\fIchannel%\fP [\fB,\fP\fIrecord\fP]" \"{{{
Read the record buffer of \fIchannel%\fP from the file it is connected to, Read the record buffer of \fIchannel%\fP from the file it is connected to,
which must be opened in \fBrandom\fP mode. If a \fIrecord\fP number is which must be opened in \fBrandom\fP mode. If a \fIrecord\fP number is
given, the record is read there instead of being read from the current given, the record is read there instead of being read from the current
record position. The first record is 1. record position. The first record is 1.
.\"}}} .\"}}}
.IP "\fBget\fP [\fB#\fP]\fIchannel%\fP\fB,\fP[\fIposition\fP]\fB,\fP\fIlvalue\fP " \"{{{ .IP "\fBget\fP [\fB#\fP]\fIchannel%\fP\fB,\fP[\fIposition\fP]\fB,\fP\fIlvalue\fP " \"{{{
Read the \fIlvalue\fP from the specified channel, which must be opened in Read the \fIlvalue\fP from the specified channel, which must be opened in
\fBbinary\fP mode. If a \fIposition\fP is given, the data is read there \fBbinary\fP mode. If a \fIposition\fP is given, the data is read there
skipping to change at line 890 skipping to change at line 897
.IP "\fBcommand$(\fP\fIn%\fP\fB)\fP" .IP "\fBcommand$(\fP\fIn%\fP\fB)\fP"
Return the \fIn%\fPth argument passed to the program, starting with 1. Return the \fIn%\fPth argument passed to the program, starting with 1.
The first returned argument (index 0) is the program name. The first returned argument (index 0) is the program name.
.IP "\fBcos(\fP\fIx_rad\fP\fB)\fP" .IP "\fBcos(\fP\fIx_rad\fP\fB)\fP"
Return the cosine value of \fIx_rad\fP. Return the cosine value of \fIx_rad\fP.
.IP "\fBcvd(\fP\fIx$\fP\fB)\fP" .IP "\fBcvd(\fP\fIx$\fP\fB)\fP"
Convert a string value generated by \fBmkd$(\fP\fIx\fP\fB)\fP back to Convert a string value generated by \fBmkd$(\fP\fIx\fP\fB)\fP back to
a floating point value. The string characters contain the bytes of a a floating point value. The string characters contain the bytes of a
C double precision value. The string length and the byte encoding is C double precision value. The string length and the byte encoding is
machine dependent and not portable. machine dependent and not portable.
.IP "\fBcvs(\fP\fIx$\fP\fB)\fP"
Convert a string value generated by \fBmks$(\fP\fIx\fP\fB)\fP back to
a floating point value. The string characters contain the bytes of a
C single precision value. The string length and the byte encoding is
machine dependent and not portable.
.IP "\fBcvi(\fP\fIx$\fP\fB)\fP" .IP "\fBcvi(\fP\fIx$\fP\fB)\fP"
Convert a string value back to an integral value. Convert a string value back to an integral value.
The string characters contain the bytes of a signed little endian number The string characters contain the bytes of a signed little endian number
and the sign bit of the last byte determines the sign of the resulting and the sign bit of the last byte determines the sign of the resulting
number. number.
.IP "\fBcvs(\fP\fIx$\fP\fB)\fP"
Convert a string value generated by \fBmks$(\fP\fIx\fP\fB)\fP back to
a floating point value. The string characters contain the bytes of a
C single precision value. The string length and the byte encoding is
machine dependent and not portable.
.IP "\fBdate$\fP" .IP "\fBdate$\fP"
Return the date as a 10-character string in the form Return the date as a 10-character string in the form
\fImm\fP\fB\-\fP\fIdd\fP\fB\-\fP\fIyyyy\fP. \fImm\fP\fB\-\fP\fIdd\fP\fB\-\fP\fIyyyy\fP.
.IP "\fBdec$(\fP\fIx\fP,\fBformat$\fP\fB)\fP" .IP "\fBdec$(\fP\fIx\fP,\fBformat$\fP\fB)\fP"
Convert \fIx\fP to a string according to the \fBprint using\fP \fIformat$\fP. Convert \fIx\fP to a string according to the \fBprint using\fP \fIformat$\fP.
.IP "\fBdeg(\fP\fIradians\fP\fB)\fP" .IP "\fBdeg(\fP\fIradians\fP\fB)\fP"
Convert radians to degrees. Convert radians to degrees.
.IP "\fBdet\fP" .IP "\fBdet\fP"
Return the determinant of the last matrix inverted. Return the determinant of the last matrix inverted.
.IP "\fBedit$(\fP\fIstring$\fP\fB,\fP\fIcode%\fP\fB)\fP" .IP "\fBedit$(\fP\fIstring$\fP\fB,\fP\fIcode%\fP\fB)\fP"
skipping to change at line 1161 skipping to change at line 1168
.IP "\fB\-u\fP, \fB\-\-uppercase\fP" .IP "\fB\-u\fP, \fB\-\-uppercase\fP"
Output all tokens in uppercase. By default, they are lowercase, Output all tokens in uppercase. By default, they are lowercase,
which is easier to read, but some BASIC dialects require uppercase. which is easier to read, but some BASIC dialects require uppercase.
This option allows to save programs for those dialects. This option allows to save programs for those dialects.
.IP "\fB\-h\fP, \fB\-\-help\fP" .IP "\fB\-h\fP, \fB\-\-help\fP"
Output usage and exit. Output usage and exit.
.IP "\fB\-v\fP, \fB\-\-version\fP" .IP "\fB\-v\fP, \fB\-\-version\fP"
Display version information and exit. Display version information and exit.
.\"}}} .\"}}}
.SH AUTHOR \"{{{ .SH AUTHOR \"{{{
This program is copyright 1999\(en2014 Michael Haardt This program is copyright 1999\(en2015 Michael Haardt
<michael@moria.de>. <michael@moria.de>.
.PP .PP
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
.PP .PP
The above copyright notice and this permission notice shall be included in The above copyright notice and this permission notice shall be included in
 End of changes. 6 change blocks. 
22 lines changed or deleted 30 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)