Linux Basic Tips Zurück zur Übersicht
Visual Basic an Linux Quickbasic und Linux Links Orginaltexte Basicallg
==> Für alle die unter Linux VB ähnlich programmieren wollen , empfehle ich Gambas .
http://groups.yahoo.com/group/phoenix-basic
http://cip.physik.uni-bonn.de/~hoffmann/X11-Basic/
http://www.fys.ruu.nl/~bergmann/basic.html
http://www.basmark.com/syntax.html
Technical Highlights
Overview
Basmark QuickBASIC is a multi-user Microsoft
QuickBASIC and IBM-PC BASICA compatible
Compiler for Unix (e.g. AIX, Solaris, HP/UX, SCO
Unix and Linux), optimized to provide consistency and
high performance across various machine architectures.
Multi-user enhancements include file sharing with file and
record locking, TERMCAP/TERMINFO screen handling
and inter-process communication via PIPE:.
Basmark QuickBASIC accepts source files to produce
assembly and object languages of the host machine. This
provides source code security not provided by traditional
interpreters. Since a high performance, extremely efficient
run-time module is produced, execution speed is much
faster than an interpreter and native floating point
instructions are generated to maximally utilize the
hardware.
Basmark QuickBASIC is a highly transportable
language compiler that, with the exception of certain
hardware dependent features and various QuickBASIC
commands inconsistent with a multiple machine
environment, will perform identically on different
multi-user, interactive systems. Thus, the very large base
of application programs written in QuickBASIC is now
available across a wide range of machines simply by
recompiling.
Basmark QuickBASIC supports the use of real,
seperately compiled subroutines (that can use local and
global variables) and multiple modules with shared,
labeled COMMON blocks. Object modules can be
linked together to created large programs that use
available memory.
Basmark QuickBASIC provides structured
programming facilities to simplify program logic and
increase both readability and maintainability.
Basmark QuickBASIC's extensive run-time library
provides the arithmetic functions, file handling routines and
string handling functions of QuickBASIC. Full run-time
error messages are provided that aid the programmer in
the diagnosis and correction of programming errors.
Basmark QuickBASIC comes with a complete set of
user documentation, including user's guide, reference
manual, error messages and a complete description of the
run-time library. An electronic version of the
documentation (HTML /WEB format) is forthcoming.
Watch this space.
Features
Structured language constructs including
IF/THEN/ELSE and WHILE/WEND.
SHELL command to invoke child processes.
LOCK, UNLOCK commands for file and
record locking.
CLS, LOCATE and COLOR implemented
using standard TERMCAP/TERMINFO.
LPRINT line printer spooling.
Full Unix pathname and directory support.
Trace facilities via TRON and TROFF
Multiple output formats including PRINT
USING.
C, Fortran and Assembly Language routines
callable by Basmark QuickBASIC.
Single (16 bit) and long (32 bit) integers. Single
and double precision floating point. Native
hardware support if available.
CHAIN statement for programs designed to run
in small memory environments.
PIPE: device extension to OPEN for I/O to
communicate with a chile process.
Error recovery.
Seek (position within a data file).
The FILES directory listing command.
Modular programming support including
separate compilation of modules and ability to build
subroutine libraries.
Multi-line DEF FN's.
REDIM, LBOUND, UBOUND statements
for dynamically allocatable arrays.
SLEEP (suspend program execution).
Local and global variables.
Recursion and user defined data types (TYPE
AS).
Real alphanumeric labels.
OPEN FOR BINARY, binary file I/O.
Shared and static variables.
Block IF/THEN/ELSE.
COMMAND$ argument passing from the
command line.
Optional C-ISAM interface to Informix
relational database.
Basmark Corporation · P.O. Box 40450 · Cleveland, OH 44140
(440) 871-1715 fax · email: jgo@Basmark.com
Some of the syntax/features above are available only in Basmark's Version 4.9 Compiler. This data page is for informational purposes only.
Basmark MAKES NO WARRANTIES, EXPRESS OR IMPLIED, in this summary.
Trademarks:
Basmark - Basmark Corporation IBM-PC - International Business Machines Corporation, Microsoft - Microsoft Corporation.
Syntax
Statements and Functions
CALL
CHAIN
COMMON
CONST*
DECLARE*
DEF FN
DEF SEG
DEFDBL
DEFINT
DEFLNG*
DEFSNG
DEFSTR
DIM
DO/LOOP/WHILE/UNTIL
END
END DEF
END FUNCTION*
END IF
END SELECT
END SUB
END TYPE*
ERASE
ERROR
EXIT DEF
EXIT DO
EXIT FOR
EXIT FUNCTION*
EXIT SUB
FOR/NEXT
FUNCTION*
GOSUB
GOTO
IF/THEN/ELSE
IF/THEN/ELSEIF
LBOUND
LET
ON GOSUB
ON GOTO
OPTION BASE
PEEK
POKE
RANDOMIZE
REDIM
REM
RESUME
RETURN
RUN
SELECT CASE/ELSE/IS
SHARED
SHELL
SLEEP*
STATIC
STOP
SUB
SWAP
SYSTEM
TYPE/AS*
UBOUND
USR
WHILE/WEND
I/O Functions and Statements
BEEP
BLOAD
BSAVE
CHDIR
CLOSE
CLS
COLOR
CSRLIN
DATA
EOF
FIELD
FILEATTR*
FILES
FREEFILE*
GET
INKEY$
INPUT
INPUT#
INPUT$
KILL
LINE INPUT
LINE INPUT#
LOC
LOCATE
LOCK/UNLOCK
LOF
LPOS
LPRINT
LPRINT USING
LSET/RSET
MKDIR
NAME
OPEN
POS
PRINT#
PRINT# USING
PRINT USING
PUT
READ
RESET
RESTORE
RMDIR
SEEK*
SEEK#*
SPC
TAB
WIDTH
WRITE
WRITE#
Arithmetic Functions
ABS
ATN
CDBL/CSNG
CINT
CLNG
COS
EXP
FIX
INT
LOG
RND
SGN
SIN
SQR
TAN
String Functions
ASC
CHR$
COMMAND$
CVD
CVDMBF
CVI
CVL*
CVS
CVSMBF
HEX$
INSTR
LCASE$/UCASE$
LEFT$
LEN
LTRIM$/RTRIM$
MID$
MKD$
MKDMBF$
MKI$
MKL$*
MKS$
MKSMBF$
OCT$
RIGHT$
SADD
SPACE$
STR$
STRING$
VAL
Miscellaneous Functions and Statements
DATE$
ENVIRON
ENVIRON$
ERL
ERR
ON ERROR GOTO
OPEN FOR BINARY*
OPEN PIPE:
OPEN/SHARED/LOCK*
SEG
SHELL
TIME$
TIMER
TRON/TROFF
VARPTR
VARPTR$
VARSEG
Meta Commands
$DYNAMIC
$INCLUDE
$MAIN
$STATIC
Operators
AND
OR
^
/
EQV
XOR
|
>
IMP
=
<>
<=
MOD
-
<
>=
NOT
+
*
\
Optional ISAM Subroutine Calls to C-ISAM (Informix Software)
IADDINDEX
IAUDIT
IBUILD
ICLOSE
IDELCURR
IDELETE
IDELINDEX
IERASE
IINDEXINFO
IKEYDESC
ILDDBL
ILDFLT
ILDINT
ILOCK
IOPEN
IREAD
IRELEASE
IRENAME
IREWCURR
IREWRITE
ISTART
ISTDBL
ISTFLT
ISTINT
IUNIQUEID
IUNLOCK
IWRCURR
IWRITE
There are two current releases of Basmark QuickBASIC, 3.7 and 4.9. The syntax flagged with an asterisk is not available
in version 3.7. Version 3.7 is most appropriate for compiling older MBASIC, BASICA and QuickBASIC 2 or 3 programs.
Basmark Corporation · P.O. Box 40450 · Cleveland, OH 44140
(440) 871-1715 fax · email: jgo@Basmark.com
NAME
basic - Basmark QuickBASIC compiler
SYNOPSIS
basic [ option ] ... file ...
DESCRIPTION
Basic is the Basmark QuickBASIC compiler from
Basmark Corporation.
Basic accepts several types of arguments:
An argument whose name ends with `.b' is taken to be a
BASIC source program; it is compiled, and the object
program is left on the file whose name is that of the
source with `.o' substituted for `.b'. The `.o' file
is normally deleted, however, if the BASIC program is
compiled and loaded all at one go.
The first file is taken as the main module where execu-
tion begins. If the file is a BASIC source program, a
startoff is included in the object program.
The following options are interpreted by basic.
See ld(1) for load-time options.
-v Print compiler version number and messages
identifying compiler passes as they occur.
-c Suppress the loading phase of the compilation,
and force an object file to be produced.
-S Compile the named BASIC program, and leave the
assembler-language output on the corresponding
file suffixed `.s'.
-o " output" Name the final output file output. If this
option is used the file `a.out' will be left
undisturbed.
-m Merge all upper-case alphabetic characters into
their lower-case counterparts, except upper-case
characters appearing in DATA statements and in
literal strings. This option must be used if the
BASIC source file is entirely in upper-case;
otherwise, the BASIC reserved words will fail to
be recognized.
-K Do not generate code to support chaining at run-
time. No module compiled with this option may
participate in chaining. This flag can be used
to save space in the object module.
-G Maintain information at run-time about line
counts instead of line numbers for tracing and
error recovery. A line count is the number of
physical lines in the source file (including
lines for include files) starting with one.
This is useful in producing diagnostics for
programs with few line numbers. This flag is
overridden by the -L flag.
-L Do not generate code to maintain information at
run-time about line numbers for tracing and
error recovery. This flag can be used to save
space in the object module and to decrease
execution time.
-C Do not generate code to check for out-of-bounds
subscripts at run-time. This flag can be used to
decrease execution time.
-R Store arrays in row-major order. Normally, they
are stored in column-major order.
-Idir Secondary location for include files. Filenames
given by the $INCLUDE meta-command which do not
begin with / are searched for first in the
current directory and then in the dir directory.
-M No main module. Do not generate a main module
startoff for any file. This flag facilitates
separate compilation.
Other arguments are taken to be loader option arguments.
The environment variables BASHOME and BASTEMP are used to
override default assignments for the directory where the
compiler passes are located and the directory used for
temporary files, respectively. The defaults for these
directories are /usr/lib/basic and /tmp.
For Version 4.9 ONLY
The compile time options `-m', `-M', `-C', `-K', and `-R'
are no longer required. As in previous releases, the
symbol table is not stripped from executables and passing
the `-s' flag to the Unix loader via the basic command line
or explictly using the Unix `strip' command) is strongly
recommended to decrease the size of executable files.
Version 4.9 performs optimizations on generated code if
the new compile time option, `-O' is specified on the
command line.
Version 4.9 generates executable programs which ignore
the interrupt and quit character (signals). This was
changed from earlier releases due to popular demand.
FILES
file.b input file
file.o object file
a.out loaded output
/tmp/btm* temporary files
bas1 first pass of compiler
bas2 second pass of compiler
libbasic.a run-time library
/lib/crt0.o runtime startoff
SEE ALSO
ld(1)
The Basmark QuickBASIC Programmer's Manual
DIAGNOSTICS
The diagnostics produced by basic itself are intended to be
self-explanatory. Occasional messages may be produced by
the assembler or loader.
http://cip.physik.uni-bonn.de/~hoffmann/X11-Basic/
X11BASIC V.1.06
Grafikfähiger BASIC Interpreter. GFA-Basic-Fans wird's freuen, endlich ein vernuenftiges Basic fuer UNIX. Laesst sich als Shell verwenden. Auch komplizierte Internetanwendungen sind möglich.
Es ist zwar noch nicht ganz fehlerfrei, aber einigermassen brauchbar ist der Interpreter schon. Die Dokumentation ist leider sehr unvollständig. Aber am besten lernt man aus den Beispielprogrammen. Uebrigens ist die Syntax an das gute alte Gfa-Basic angelehnt. Viele Gfa-Basic-Programme lassen sich einfach portieren.
Ich suche uebrigens noch interessierte Programmierer, die den Code weiterentwickeln wollen.
http://www.basmark.com/man/version3.7/
sehr schöne Erklärung aller Basic Befehle
Product Information
View Technical Highlights of QuickBASIC
View Syntax Description of QuickBASIC***
View Manual pages of QuickBASIC
View Fee Schedule for QuickBASIC
Request QuickBASIC DEMO
ORDER QuickBASIC for Linux Online
http://groups.yahoo.com/group/phoenix-basic